Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert statement error

Status
Not open for further replies.

Sjoker

Programmer
Aug 4, 2000
30
NL
In an application I get the error cannot insert null into....
When I use SQLSpy to see what is happening I get;
/*** Insert - n_ds(1) TimeStamp: 06/03/03 16:26:31:81 ***/
INSERT INTO "BIO_SESSION" ( "SESSION_NUM", "REF_SESSION_TYPE_ID", "COMPANY_GROUP_ID", "START_TIME", "END_TIME", "TOTAL_TIME", "CREATED_PROCESS", "LAST_UPDATED_PROCESS" ) VALUES ( :1, :2, :3, :4, :5, :6, :7, :8 )

/*** DBError - n_ds(1) TimeStamp: 06/03/03 16:26:31:82 ***/
/*** Database error code: 1400
Database error message: ORA-01400: cannot insert NULL into ("TRI_TEST"."BIO_SESSION"."LANGUAGE_ID")

How can I add the missing column to the insert statement?
 
This could be cause by one or more of the null value you trying to insert into a non-nullable columns in the database.

One of the way to check which one is a null value try to use this: if isnull(ls_string) then ls_string = ""
 
You need to either add this column to your datawindow object, make sure it's marked as an updatable column in the dw painter, and then populate it in your code OR account for this column in whatever is generating your SQL statement.
 
Thank you, I forgot to set the update property
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top