05-01-2009 10:19 AM
We have a datagrid whose source is a custom table. The user can update the value in the datagrid via a pick list. I want to be able to also add that value chosen to a USERFIELD in the ACCOUNT table.
I added an AXFormAfterPost event to the datagrid and now I get the following error:
The statement has been terminated. : Cannot insert the value NULL into column 'SECCODEID', table 'mydb.sysdba.ACCOUNT'; column does not allow nulls. INSERT fails.
at line 13, char 2 (in the code below it is this code: objRS.Update)
Below is the code:
'Including Script - SystemLX Database Support
Set objSLXDB = New SLX_DB
Set objRS = objSLXDB.GetNewRecordSet
objRS.Open "Select A.USERFIELD10 From ACCOUNT A Where A.ACCOUNTID = '" & application.BasicFunctions.CurrentAccountID & "'", objSLXDB.Connection 'DNL
objRS.Fields("USERFIELD10").Value = Picklist1.Text
Set objRS1 = Nothing
What am I missing?
Thank you in advance.
SLX LAN 7.2.1
Solved! Go to Solution.
05-01-2009 11:08 AM
I think you are doing something else somewhere else and this is not the right bit of code/line. Check for an insert into account table - as this looks like where the error is (appreciate you may think it's here etc - but that's a select, not an insert).