Detect change in DataBase

  • Thread starter Thread starter PawelR
  • Start date Start date
P

PawelR

Hello everybody,
In my apps I use MSDE and I want detect all chanege in one table (most
inportant is INSERT). This table is very long (over 50000 records). I want
very fast refresh data in my DataSet.

Thx Pawel
 
To "detect" changes, set up a trigger on the table. This will not add a lot
of weight. For refresh, you may need to add an index or two, depending on
your query.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside the box!
*************************************************
 
Thanks Gregory,
I don't wont non stop "ask" database I wont connect to db only if table is
changed.
Pawel
 
Thanks Gregory,
I don't wont non stop "ask" database I wont connect to db only if table is
changed.
Pawel

That's kind of a problem Pawel, because if you close your connection to the DB
you can't communicate with it. Doing what you want to do isn't easy, since MS
SQL Server won't tell you anything unless you ask it.

If you're using a DataSet, won't you be able to do a HasChanges against the
DataSet to check for changes?

Are you wanting the user to be able to see changes to the table that they have
made? If so, do you want them to be able to see changes other users made also?

If you want the user to see changes other users made to the table, you will have
to query the table periodically to get the changes other users have made.
That's the only way to get that info about other user changes.

I suppose you could do a turn around select every time your user inserts,
deletes or updates something, but that wouldn't tell other users that a change
had been made.


Otis Mukinfus
http://www.otismukinfus.com
 
Back
Top