Is the problem here that you have created your tables to have columns that are specified "NOT NULL WITH DEFAULT"? If you use interactive SQL to create tables, for example, the tables are created with this default. This will make it impossible to ever get a null value into the database table. When you pass in null, the default value goes into the column instead of the null. If checking into this doesn't help, I can post JDBC examples setting database columns to null and getting the null value back out if that would help. Regards, Richard D. Dettinger AS/400 Java Data Access Team Think your job is safe? Your future? Your company's existence? Think again. Right now there are people planning to do you in. To replace you, steal your paycheck, obliterate your business, throw you out in the street. ...This is your wake-up call. Digital Darwinism is unstoppable. -Paul Somerson enord@ORIENTAL.COM on 11/12/99 10:20:06 AM Please respond to JAVA400-L@midrange.com To: JAVA400-L@midrange.com cc: Subject: Database I/O Can anyone give me examples of doing direct database IO's on the AS/400 via Java? My problem is populating a file that has a null capable field. Everytime I try to put a null into this field via a JDBC connection using SQL the AS/400 places a '0' into it. When I then run the application it errors out because it is expecting a null value. I was really hoping by doing direct database connection would solve this problem. Any help would be greatly appreciated. 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 +--- +--- | 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: firstname.lastname@example.org +---
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.