±Û¾´ÀÌ :realkyo 2000³â 3¿ù 16ÀÏ 17:24:19
In Reply to: DB¿¡¼ ¹öÆÛ¿¡ÀÖ´Â ³»¿ëÀ» ÀúÀåÇÏ·Á¸é..................? posted by realkyo on 2000³â 3¿ù 16ÀÏ 13:06:21:
ÀÌƲ¸¸¿¡ °Ü¿ì µÆ½À´Ï´ç!!!!!(T.T);±â»Ç¼ ´«¹°ÀÌ....
ÀÌ°Ô ¿øº»Àε¥.....
java.io.File file = new java.io.File("/tmp/data");
int fileLength = file.length();
java.io.InputStream fin = new java.io.FileInputStream(file);
java.sql.PreparedStatement pstmt = con.prepareStatement(
"UPDATE Table5 SET stuff = ? WHERE index = 4");
pstmt.setBinaryStream(1, fin, fileLength);
pstmt.executeUpdate();
ÆÄÀϺκÐÀ» bytearrayinputstream À¸·Î ¹Ù²Ù´Ï±î µÇ³×¿ä.
¹ÌÅײ² Á¦°¡ ¼öÁ¤ÇÑ °©´Ï´Ù.Àúó·³ ÇظŽÃÁö ¸»±æ...
(³ª¸¸ ÇظǰŠ°¡Å¸...ÂÊÆÈ·á....*^.^*)
InputStream fin = new ByteArrayInputStream(condata);
PreparedStatement pstmt = con.prepareStatement(
"UPDATE Table1 SET data1 = ? WHERE id = 1");
pstmt.setBinaryStream(1, fin, 10);
pstmt.executeUpdate();
ÀÌ»ó Áø Ãʺ¸ ¸®¾ó Äì ¿´½À´Ï´Ù.