I want to insert image into table which contain a field with datatype MEDIUMTEXT. Please can any one tell how to insert mediumtext data
psmt=con.prepareStatement("INSERT INTO ofvcard (username,vcard) " + "VALUES (?,?)");
psmt.setString(1,"admin");
fis=new FileInputStream(image);
psmt.setBinaryStream(2, (InputStream)fis, (int)(image.length()));
int s = psmt.executeUpdate();
psmt=con.prepareStatement(“INSERT INTO ofvcard (username,vcard) ” + “VALUES (?,?)”);
psmt.setString(1,”admin”);
pstmt.setString(2,”testing”)
int s = psmt.executeUpdate();