• Subject: Re: Database I/O
  • From: "Luther Ananda Miller" <luther.miller@xxxxxxxxxx>
  • Date: Tue, 16 Nov 1999 09:54:26 +0100
  • Organization: HYPERe

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
> enord@oriental.com


+---
| 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: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.