Hi, Do it on the database - you won't make mistakes.
I suggest you take a look at our product IB LogManager that can do the hard work for you - see www.upscene.com With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird! > Hi all, > > I want to record all changes in tables (insert/update/delete). > > I can do this by creating triggers for each tables, triggers ex : > > SET TERM ^ ; > CREATE TRIGGER UPD_M_AREA FOR M_AREA ACTIVE > AFTER UPDATE POSITION 10 > AS > BEGIN > insert into log (id_tbl,tbl_nm, opr) > values(new.ID, 'M_AREA', 'U'); > END^ > SET TERM ; ^ > > SET TERM ^ ; > CREATE TRIGGER DEL_M_AREA FOR M_AREA ACTIVE > AFTER DELETE POSITION 10 > AS > BEGIN > insert into log (id_tbl, tbl_nm, opr, sql_del) > values(old.ID, 'M_AREA', 'D', old.dscp); > END^ > SET TERM ; ^ > > SET TERM ^ ; > CREATE TRIGGER INS_M_AREA FOR M_AREA ACTIVE > AFTER INSERT POSITION 10 > AS > BEGIN > insert into log (id_tbl,tbl_nm, opr) > values(new.ID, 'M_AREA', 'I'); > END^ > SET TERM ; ^ > > Or, I can record changes via my app, which one do you thing is better, > regarding database performance and size? > > Thanks in advance and best regards, > sugiarto > > > > > ------------------------------------ > > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > Visit http://www.firebirdsql.org and click the Resources item > on the main (top) menu. Try Knowledgebase and FAQ links ! > > Also search the knowledgebases at http://www.ibphoenix.com > > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > Yahoo! Groups Links > > >
