|
Since you are doing *after *insert does your trigger program then read in the record to do the change? Joe Reinhardt -----Original Message----- From: tomh@simas.com [mailto:tomh@simas.com] Sent: Wednesday, March 13, 2002 11:58 AM To: midrange-l@midrange.com Subject: RE: SQLCODE -907 This is a multipart message in MIME format. -- [ Picked text/plain from multipart/alternative ] Not a red herring, but doesn't really help either. The trigger time is *AFTER, trigger event is *INSERT. We use SQL to 'INSERT INTO' the file, which causes the trigger to run, which in turn runs the program, which updates a field in the row we're inserting. On the SQL 'INSERT INTO' - if we use 'WITH CS' (isolation level: row is locked until end of current transaction) at the end of it, we get the SQLCODE -907. If we leave the 'WITH CS' off, we get no error and the files are updated like we want but a ROLLBACK does nothing. What we want is to set an isolation level and not get the -907, and be able to do a ROLLBACK. How do we accomplish that? Do I need to post the C program to show how the files are being updated? Tom Hightower Solutions, Inc http://www.simas.com Buck Calabro <Buck.Calabro@commsoft.net> Sent by: midrange-l-admin@midrange.com 03/13/02 10:27 AM Please respond to midrange-l To: midrange-l@midrange.com cc: Subject: RE: SQLCODE -907 Tom wrote: >When we looked up -907, we found that it said >something like "attempt to update same row twice". DSPMSGD SQL0907 says that a trigger fired which tried updating the same row. Does that help, or is it a red herring? --buck _______________________________________________ _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l or email: MIDRANGE-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.