sql server - TADOConnection.OnExecuteComplete / OnWillExecute event not called with TADOTable -


i try trace sql command. read post : how can monitor sql commands send on ado connection?

it work select not delete/insert/update...

configuration : tadoconnection (ms sql server), tadotable, tdatasource, tdbgrid tdbnavigator.

so can trace select occurs when table open, nothing occurs when use dbnavigator update, insert, or delete records.

when use tadocommand delete record, works too. seems doesn't work when use dbnavigator maybe clue don't find that.

thanks in advance

hopefully able point in direction of pre-existing library logging you. in particular, if firedac option, might take @ says in here:

http://docwiki.embarcadero.com/radstudio/xe8/en/database_alerts_%28firedac%29

of course, converting app using ado firedac, may not option you, depending on how great need is, conceivably extract sql-server-specific method of event alerting firedac uses ado application. looked briefly while ago , looked straightforward.

prior firedac, implemented server-side solution caught inserts, updates , deletes. had 10 years ago (for sql server 2000) , quite performance set up.

in outline worked this:

sql server supports ms used call "extended stored procedures" implemented in custom dlls (ms may refer them different name these days or have stopped supporting them). there delphi libraries around provide wrapper enable these written in delphi. of course, these days, if sql server 64-bit, need generate 64-bit dll.

you write extended stored procedures log changes way want, write custom triggers in database inserts, updates , deletes, feed data of rows involved xsps.

as luck have it, need fell away completing project, before got stress-testing , performance-profiling did work.

of course, not in every environment allowed/able install s/ware , trigger code on sql server.

for interest, might take @ https://msdn.microsoft.com/en-us/library/ms162565.aspx, provides smo object tracing sql server activity, though seems 32-bit @ moment.

for amusement, might have go @ implementing event-handler recordset object underlies tadotable/tadoquery, sould able catch changes you're after don't hold breath ...

and, of course, if you're interested in client-side logging, 1 way write handlers dataset's afteredit, afterinsert , afterdelete events. wouldn't guarantee changes ever applied @ server, of course, provide accurate record of user's activity, if that's sufficient needs.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -