Yeps, so, why don't you try that? Give it a try. I used the jconn3 driver to connect to my Sybase database. Driver Class being 'com.sybase.jdbc3.jdbc.SybDriver'. The moment you try to call the getBlob() method, you will get a nice exception stack trace, informing you that this is an unsupported operation! Yeps, its not as straight forward as that!
But don't worry, it actually is even more simple! For fetching the BLOB data all you need to do is:
// build a byte array
byte stuff[] = resultSet.getBytes(
// check the size of the data now
System.out.println("BLOB Size: " + stuff.length);
Congratulations! You have retrieved the BLOB data from a Sybase IMAGE column!!!
No comments:
Post a Comment