Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

PreparedStatement.setBlob not appropriate for SQL Server?  RSS feed

Tina Coleman
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!