PreparedStatement.setBlob not appropriate for SQL Server?
posted 15 years ago
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.)