Erik, You say that the file is *NOT NULL with no defaults- then that means you can NOT set the fields the NULL, doesn't it? Or am I missing something? In any case, to set a particular parameter in a prepared statement to null, use setNull() method the prepared statement or callablestatement instead of the setObject etc that you would use for a non-null value. Hope that helps- not sure if I understood the problem correctly. Luther ----- Original Message ----- From: <enord@ORIENTAL.COM> To: <JAVA400-L@midrange.com> Sent: Monday, 15 November 1999 19:16 Subject: Re: Database I/O > > > Exactly. I have a database file that is specified *NOT NULL I do not use a > default value. When I try to use a JDBC sql statement it makes me pass a value. > The other problem is the fields are binary. The actual definition is LONG > VARCHAR FOR BIT DATA. The AS/400 creates this into a HEX 8128 field. Java > tells me the best way to pass this is by using a InputStream object. The > problem is I cannot figure out how to create a InputStream value which is null. > I was think that maybe I could populate this field using a direct database > connection and set those fields to null. If you have a better idea, please > help. I am ready for any suggestion. If you have code examples would greatly > help. > Thank You > Erik Nord > Oriental Trading Company > Omaha, NE > firstname.lastname@example.org +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: email@example.com +---
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.