On 16.08.2006 15:50 gself wrote:
> I was hoping for something like an isnull test.
> String value = rs.getString(1); requires an extra creation of a String
> var
> wasNull requires the getString first to set it's status anyway
> Oh well, I'm justing longing for the good old days of 'C' where if you
> could think of it you could do it.
How should the driver decide that without fetching the value from the
server? There is no way around the getXXXX()
Btw: I doubt that rs.getString(1) will create a *new* String (in the
sense that additional memory is allocated to hold the character data)
If the driver simply does a "return value" where value is the String
that it created, no additional memory is required (except for your local
reference).
Even a "return new String(value)" does not copy the character data. The
new String merely references the character array of the source (this is
possible as Strings are imutable)
Thomas
--
It's not a RootKit - it's a Sony
>> Stay informed about: Testing for empty columns in resultset