aspose file tools*
The moose likes JDBC and the fly likes PreparedStatement.setBlob not appropriate for SQL Server? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "PreparedStatement.setBlob not appropriate for SQL Server?" Watch "PreparedStatement.setBlob not appropriate for SQL Server?" New topic
Author

PreparedStatement.setBlob not appropriate for SQL Server?

Tina Coleman
Ranch Hand

Joined: Dec 12, 2001
Posts: 150
Anyone have any experience with varbinary data in SQL Server and saving it through a PreparedStatement? Right now, my DAO's trying to do a PreparedStatement.setBlob() and getting a java.lang.UnsupportedOperationException. This code's worked successfully on SQL Server and on Oracle, but is not working successfully when using SQL Server 2000, whether I use Sun's jdbc dbc driver or Microsoft's JDBC driver. My guess would be that instead of using setBlob, I should really be using setBinaryStream?? (Because I'm working with an existing library, I don't have access to the code to make the change and test it - but am just curious as to whether that would be the appropriate solution so that I can make a "feature request" of the team supporting the code.)
Tina
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: PreparedStatement.setBlob not appropriate for SQL Server?