sqlite-jdbc icon indicating copy to clipboard operation
sqlite-jdbc copied to clipboard

Calling ResultSet.getBlob() results in an error

Open udittmer opened this issue 3 years ago • 2 comments

even though "ResultSet.getMetaData().getColumnTypeName(1) = BLOB"

The issue surfaced when using SquirrelJDBC, but the folks over there think it's a driver issue; see this ticket for the details.

ClassCastException.sqlite.zip

udittmer avatar Mar 15 '21 08:03 udittmer

Is this still an issue ? Can you provide more details ?

gotson avatar Jul 27 '22 08:07 gotson

Yes, this still happens with sqlite-jdbc-3.36.0.3.jar

udittmer avatar Jul 28 '22 06:07 udittmer

as indicated in #622 you can use getBytes to retrieve the whole blob as a byte[].

Implementing getBlob is not required in the JDBC spec, so SquirrelJDBC should be able to catch that SQLFeatureNotSupportedException and try a getBytes instead.

gotson avatar Aug 30 '22 09:08 gotson

Closing this in favor of #622

gotson avatar Sep 21 '22 07:09 gotson