SQL Problems: SQLSTATE=42601
843854Sep 13 2004 — edited Sep 15 2004Hi JavaGurus, i am updating the db2 database by using the following command
String updatecommand ="insert into patient values ("+did+", '"+PFN+"' , '"+PLN+"','"+ADDR+"','"+CT+"', '"+ST+"',"+ZP+","+PH+",'"+US+"','"+PS+"')";
stmt.executeUpdate(updatecommand);
if i give the values of all the fields then everything works fine. But if i skip any of the fields it gives an error saying
COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0104N An unexpected
token "," was found following "sfd' , '','','', '',". Expected tokens may incl
ude: "<rvc_element>". SQLSTATE=42601
Is there a way that i can tell the program to give the error message "saying that all the fields are required" please help me as soon as possible.in my database all the fields by default are notnullable