DB2 Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDB2 Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 8th, 2004, 10:42 AM
jcale4 jcale4 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 2 jcale4 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDB2 Development > Inserting row on table with triggered column


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT