This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi. I am having a problem updating a file on our AS/400. I am connecting to our AS/400 via JDBC (V3R2 400). My problem is, in my application, I have numerous fields that the user can enter information into. The user is not required to enter info into every field( ie.. not every vendor has a minimum order amount). Right now, I am taking the value of whatever is in the fields and updating the 400 with that info. However, if the user does not key something into a field (like minimum order amount) then I get an error message "SQL0407 - Null value is not allowed for field PCVMIN in table PCVEND". I want the user to not have to key information into this field, and be able to update the 400 without getting this error message! What do I need to do? (Min order is a numeric field). Any help is greatly appreciated. (I am using VA for Java 3.5.3 if that makes any difference). Thanks in advance!
why don't you set a default value, or allow null in the database field? It sounds like you are violating a database constraint of "NOT NULL" Jamie
Joined: Feb 28, 2001
Thanks for the reply. If I set the database field to ALWNULL... I get an error message when trying to run an update program on the AS/400 that tells me a data mapping error has occurred, and an unexpected null value was found. ( I had to write a program to output zeros into numeric fields that had blanks in some of our old records). Any other suggestions?