Board index » delphi » Detecting database change

Detecting database change

Hopefully a simple one.

I am looking for a way to know that a given table has been changed in any
way by any user (not just by the current app). I do not neet to know
specifically what they did, I just need to know that something was changed
(edited, deleted, added, etc).

Thank you in advance

Steve

 

Re:Detecting database change


with mytable.refresh your table will be refreshed. if any changes are made
by another user, then this changes are displayed. if you are working in a
network then this i quite useful.
but if you want to know if changes are made then you have to use something
other which i don't know.

christoph kindle

Quote
>Hopefully a simple one.

>I am looking for a way to know that a given table has been changed in any
>way by any user (not just by the current app). I do not neet to know
>specifically what they did, I just need to know that something was changed
>(edited, deleted, added, etc).

>Thank you in advance

>Steve

Re:Detecting database change


Quote
>MICROCIMM wrote:

>I am looking for a way to know that a given table has been changed in >any way by any user (not just by the current app). I do not neet to >know specifically what they did, I just need to know that something >was changed

Have a look at the OnDataChange event of the table's datasource.

__________
Andreas

Re:Detecting database change


There is a TDataSet.modified property, though there can be problems using
this.  It is, I believe, ReadOnly, so any modifications made by initialization
of a dbEdit field, etc. will also set this to true.  It will also be true if a
user changes a field and then changes it back to the original value.

Judd Reiss

Quote
MICROCIMM wrote:
> Hopefully a simple one.

> I am looking for a way to know that a given table has been changed in any
> way by any user (not just by the current app). I do not neet to know
> specifically what they did, I just need to know that something was changed
> (edited, deleted, added, etc).

> Thank you in advance

> Steve

Other Threads