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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

db2xml.update

Status
Not open for further replies.

hase75

Programmer
Nov 18, 2003
2
DE
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

 
Hello Hase,

I think this documentation of the SQLCODE should give you a hint:

-407 AN UPDATE, INSERT, OR SET VALUE IS NULL, BUT THE
OBJECT COLUMN column-name CANNOT CONTAIN NULL
VALUES

Explanation: One of the following conditions occured:

- A null insert or update value was specified for a column
defined as NOT NULL.

- No insert value was provided for a column that does not
have a default value.

- A SET transition variable statement specified a NULL
value for column defined as NOT NULL.

- The insert value was DEFAULT, but the object column was
declared as NOT NULL without WITH DEFAULT in the table
definition. Consequently, a default value of NULL cannot
be inserted into that column.

- A null insert value was specified for a ROWID column.

System Action: The statement cannot be executed. The
'column-name' might be returned in the SQLCA, depending
on the syntax of the SQL statement in which the error
was detected.

Programmer Response: Examine the definition of the object
table to determine which columns of the table have the
NOT NULL attribute or have a type of ROWID, and correct
the SQL statement accordingly.

Destination: 23502

Greetings from Karlsruhe, Germany Stephan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top