Good day!
Is there any idea on how to insert large amount of data in database using
JDBC? (let say 50MB of data). Or, could you please help me to find out what
is wrong in my code, I used the method updateAsciiStream(String,
java.io.InputStream, int) in ResultSet Class which is capable to update the
content of the database, but it does'nt work.
try {
stmt = conn.createStatement( ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE );
stmt.execute("insert into attachments(attID,msgID,filename,"
+ "contentType,encoding,attBody) values(100,'Dummy',"
+"'dummy.dat','text','7bit','test data')" );
rs = stmt.executeQuery("SELECT attBody FROM attachments where
attID=100" );
if( rs != null ) rs.next();
FileInputStream f = new FileInputStream( "filename.txt" );
InputStream is = f;
rs.updateAsciiStream( "attBody", is, is.available() );
}
catch( .... ) {}
but some exception has occured as shown below,
java.sql.SQLException: JZ0BT: The updateAsciiStream(String,
java.io.InputStream, int) method is not supported for ResultSets of type
CONC.
Thank you in advance,
John John Tobias
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html