How could I know a row has been updated ?
Posted in 2000
Topics: Triggers, Constraints & Referential Integrity
Hi, I have created a database on Informix SE v7 on Unix. I have also created some triggers on Insert and Update evnents between a few tables. My problem is that the software which uses the database treat the Informix's tables as C-ISAM files and uses a 'write' instruction to insert or update rows. But this instruction doesn't fire my triggers. So I would like to know if there is a system table which could show me what has been inserted or updated ? If you have another idea of a file or anything else which contains these informations, you can tell me. Thanks. Jean Luc. -- Posted via CNET Help.com http://www.help.com/
In article <sjnego9q5ri103@corp.supernews.com>, JL <jlr@voila.fr> wrote: > > Hi, > > I have created a database on Informix SE v7 on Unix. I have also > created some triggers on Insert and Update evnents between a few > tables. > > My problem is that the software which uses the database treat the > Informix's tables as C-ISAM files and uses a 'write' instruction to > insert or update rows. But this instruction doesn't fire my > triggers. > > So I would like to know if there is a system table which could show > me what has been inserted or updated ? If you have another idea of a > file or anything else which contains these informations, you can tell > me. > > Thanks. Jean Luc. Jean Luc, by using a low level function like C-ISAM, you are bypassing the benefits of the engine, like enforcement of constraints and firing of triggers. I think logging is available to CISAM users, so the tblog utility may be able to give you a clue as to what row was changed. But don't ask me how to use it - that knowlege is locked away among the cobwebs of ancient memories. -- +----- Jacob Salomon - DBA JSalomon@bn.com - --------------------------+ |------------------- Bulletin Board Announcement ----------------------| | Congregants will please note that the bowl at the back of the church | | bearing the sign "For the Sick" is for monetary contributions only. | +----------------------------------------------------------------------+ Sent via Deja.com http://www.deja.com/ Before you buy.
JL wrote: > I have created a database on Informix SE v7 on Unix. I have also created > some triggers on Insert and Update evnents between a few tables. > > My problem is that the software which uses the database treat the > Informix's tables as C-ISAM files and uses a 'write' instruction to insert > or update rows. But this instruction doesn't fire my triggers. > > So I would like to know if there is a system table which could show me > what has been inserted or updated ? If you have another idea of a file or > anything else which contains these informations, you can tell me. As Jake Salomon said, there's no way for the SQL code to know that you're using the C-ISAM stuff. This, incidentally, is the basis for one of Codd's 12 Rules for databases -- the no subversion rule. I don't think the tblog program (which comes with OnLine) will help. I think your best bet is probably an audit trail. CREATE AUDIT ... DROP AUDIT ... Or replace the C-ISAM code with SQL code. -- Yours, Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!"
Hi Jonathan, Thank you for your answer. I'm going to try to use an audit trailer on the tables. Goodbye. Jean Luc. -- Posted via CNET Help.com http://www.help.com/
Hi Jacob, Thanks for your answer. Good bye. Jean Luc. -- Posted via CNET Help.com http://www.help.com/
Been here, and no we never got a solution, as you say the fact you are talking ISAM means the sqlexec etc doesn't know the row has changed and so your triggers aren't fired. JL wrote: > > Hi, > > I have created a database on Informix SE v7 on Unix. I have also created > some triggers on Insert and Update evnents between a few tables. > > My problem is that the software which uses the database treat the > Informix's tables as C-ISAM files and uses a 'write' instruction to insert > or update rows. But this instruction doesn't fire my triggers. > > So I would like to know if there is a system table which could show me > what has been inserted or updated ? If you have another idea of a file or > anything else which contains these informations, you can tell me. > > Thanks. Jean Luc. > > -- > Posted via CNET Help.com > http://www.help.com/ -- Paul Watson # WF Software Ltd # You are only young once Tel: +44 1436 674729 # but you can be immature Fax: +44 1436 678693 # for ever www.wfsoftware.com #