Subject BLOBs
Author Steffen Heil
Hi


1) I need to find out, whether a blob field is null or not. BUT I need to do
so using java only. No stored procedures.
If the blob is small, then this is easy:
ResultSet.getBytes( x ) == null
Or
ResultSet.getBytes( x ); wasNull();

However, the blobs in my case might be up to several hundred megabytes...
To make things even more complicated, I need to solve this using JDBC only.
No jaybird-specifics.

Is this even possible?


2) I need to load some blobs of a big table, but not all. Whether I want to
read a certain block depends on other values in the same row.
Can I just do something like this:
select value1, value2, blob from ....
and
if ( resultSet.getInt( "value1" ) == 3 )
return resultSet.getBytes( "blob" );

Now I am a little concerned that this results in fetching all blobs from the
server. Is this correct? Or are only the those blobs fetched that I actually
get() ?
Or do I have to select only the other values and then open another statement
especially for the blobs I am interested in?

Regards,
Steffen



[Non-text portions of this message have been removed]