If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Problem in Trigger

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-11-04, 11:39
rabbit rabbit is offline
Registered User
 
Join Date: Oct 2003
Location: Germany
Posts: 29
Problem in Trigger

Hi all,
i work at moment with DB2 XML Extender und want to update the element's value in the xml documents. I store the xml data in xmlclob column. Using the following commando

stmt.executeUpdate("UPDATE xmlclobtable set xml_dok = db2xml.update(xml_dok, '//author', 'db2xmldok')");

The value of author Element are to be overwritten. But i get the error message during the update:

COM.ibm.db2.jdbc.DBException: [ IBM][CLI Driver][DB2/NT ] SQL0723N An error occurred in a triggered SQL statement in trigger "ZHOU.U0016959". Information returned for the error includes SQLCODE "-407", SQLSTATE "23502" and message tokens "TBSPACEID=2, TABLEID=45, COLNO=0". SQLSTATE=09000

Does anybody know what's wrong with the trigger? I didn't program yet for the trigger. Have i anything forgotten? Please help me! I use DB2 V8 XML Extender.

Thank you very much and greeting from germany!


rabbit
Reply With Quote
  #2 (permalink)  
Old 01-12-04, 08:07
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Rabbit,
If you look the SQL state in the Message Reference, 23502 is an "Insert or Update value is null but the column cannot contain null valuess". Check what the trigger is doing and make sure that it is not trying to insert or update a not nullable column to null.

Andy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On