Hi,


I am working on upload into database and download from database application.
It is working fine with <4K. but If it is >  4K it is closing the connection
by

The exception is thrown on the 'con.close()'.

Here is is the simple code..

java.io.File f = new java.io.File(fullpath);

FileInputStream fis = new FileInputStream(f);

PreparedStatement pstmt = con.prepareStatement("insert into MP1.TBL_UPLOAD
values (?,?,?)");

pstmt.setInt(1,114);
pstmt.setString(2, filename);
pstmt.setBinaryStream(3, fis, (int)f.length());
pstmt.executeUpdate();

pstmt.close();



con.close();

Please any one help me .. I stuck in this problem.   Please do needful, I
will thankful to u.

Thanks,
Malla Reddy

[EMAIL PROTECTED]




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.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

Reply via email to