This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PreparedStatement.setBlob not appropriate for SQL Server?

Tina Coleman
Ranch Hand
Posts: 150
  • 0
  • 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.)
I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic