Thanks Erik. I figured out how to enable the event monitor, and saw that
offending statment. The problem I had was I was using an API to a
commercial application, for which no source code is available, only the
API's, and everything I passed back to the app seemed correct, however
something later on down the line in the application, which was using
some data I passed back, was creating the bad insert statment. There was
no trace I knew of to get thier application to spit out the statments.
Believe me, any DML statments I make in my code I put in a debug loop to
be spit out if the debug varibale is set.
Thanks again for your help..
Ken
Erik Hendrix wrote:
Hey Ken,
Normally together with the SQL Code you should also be able to retrieve the
error text associated with it. This text will then show the statement it
failed on. It would always be good practice within the code to not only show
the SQL Code but also the associated text with it.
Otherwise, if this is a dynamic statement, and nothing else uses the
database then you might be able to find it using the dynamic SQL snapshot.
Or you can setup a statement event monitor which I believe would also give
it to you. The event monitor will be more easy to use since the snapshot
will give you all statements that were run.
I hope this helps.
"73blazer" <yo**@ma.com> wrote in message
news:C9********************@centurytel.net...
Hello,
I was wondering if anyone can tell me if/how I can list the DML
transactions attempted against my DB2 database. I'm writing some code
for an application which uses DB2, and my code is producing a -407 ("An
update or insert value is null, but the object column cannot contain
null values").
The problem is I cannot make the application spit out the end
transaction it's trying to run, so I have no way to know what to correct
in my code.
So I thought if I could make DB2 log the transaction, then I could see
what's happening.
Thanks.
Ken