db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Ondruška <peter.ondru...@kaibo.eu>
Subject Re: nulls in prepared statement
Date Wed, 20 Jul 2011 22:45:10 GMT
Eclipselink or Hibernate might help if you want less ugly code.
Dne 20.7.2011 23:38 "Tomcat Programmer" <tcprogrammer@yahoo.com> napsal(a):
>
>
>>
>> You must explicitly set value to null:
>>
>> if (cobj.getPartNo()==null) pstmt.setNull(1, java.sql.Types.VARCHAR);
>> else pstmt.setString(1,cobj.getPartNo());
>>
>
> Hi Peter, thanks for responding but I am aware of this as I indicated in
my post. You realize how tedious this will be with any significant number of
fields?  What I am asking about is if there is an alternate solution.
>
> Thanks in advance,
> TC

Mime
View raw message