
December 8th, 2004, 10:42 AM
|
|
Registered User
|
|
Join Date: Dec 2004
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Inserting row on table with triggered column
Hello,
I am an ASP developer new to DB2. I have a table which contains an ID field that is triggered to auto-increment. When I execute my SQL from my ASP page to insert a new row, how do I ensure the ID field is triggered to update? Currently, i am skipping the ID column and attempting to add the other collumns.. here is the error i see on my page -
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[IBM][CLI Driver][DB2/NT] SQL0407N Assignment of a NULL value to a NOT NULL column "TBSPACEID=2, TABLEID=13, COLNO=0" is not allowed. SQLSTATE=23502
/cscweb/testing/emp/Quality_IndividualCall.asp, line 259
I understand that this is because i'm skipping the ID field in the SQL, but how do I call out that trigger? Do i just use the trigger name in place of the collumn name? if so, what is the value? here is my SQL:
INSERT INTO tblQuality_IndividualCalls (Metrics, TypeCall, OriginalName, Position, EventName, Rater, Area, CallCountStatus, CallStatus, Standard, Team_Name, PositionLevel, DateRating ) VALUES ('Quality', '" & typecall & "'," & "'" & o_name & "'," & "'" & pos_title & "'," & "'" & callname & "'," & "'" & uid & "'," & "'" & area & "'," & "'Count Call', 'Quality In Progress', " & stnd & "," & "'" & team & "'," & "" & pos_level & "," & "'" & finDate & "')"
help! thank you!
|