Xref: alice comp.databases.oracle.tools:12173 Path: alice!news-feed.fnsi.net!dca1-hub1.news.digex.net!digex!newshub.northeast.verio.net!cpk-news-hub1.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!newsfeed.sovam.com!sovam!demos!news1.spb.su!news.nsk.su!news.ftc.ru!not-for-mail From: "Anatoly V. Lisovoy" Newsgroups: comp.databases.oracle.tools Subject: Re: Auditing - Insert via Post Query Trigger Date: Thu, 30 Apr 1998 11:04:15 +0600 Organization: Center of Financial Technologies Lines: 30 Message-ID: <6i8tgt$eak$1@david.ftc.ru> References: <354783E4.69AA@domain-tech.com> X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Ed Jennings wrote <354783E4.69AA@domain-tech.com> ... >I'm running Forms 4.5 in an NT environment. I have >a requirement to capture the SQL for every query >launched against the database from the application. >I tried to use the :SYSTEM.LAST_QUERY variable from >within a POST_QUERY trigger to insert the value along POST_QUERY trigger fires EVERY TIME When Forms fetch record to block during query executed. In QUERY_MODE(when Forms execute query) you can't do any modifications your databse. Try use PRE-QUERY trigger for auditing user actions - it fires once befor query execution, but best way (imho) - use server auditing ( "audit" SQL-command with AUDIT_TRAIL=TRUE options on server). >with the username into an audit table. However the >COMMIT statement was flagged as an error. I tried >it without the COMMIT, and I got no error, but no BTW - Forms "COMMIT" command is not SQL "COMMIT". Forms COMMIT flush all changes ALL base table blocks in current form. If you need SQL "COMMIT" command use FORMS_DDL('COMMIT'); function. >e.jennings@domain-tech.com >The opinions expressed here are my own, not those of Domain Technologies Anatoly/ Sorry my english.