Click here to Skip to main content
16,020,249 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi guys
i wanna show latest result from a SQL table ,so i have to get records that updated,Inserted and deleted records then update my datagrid view.
how can i get the changed records frequentlly?
in my case ,timer wouldn't answer me.
Posted

You need to implement some sort of notification service that updates the client once data is changed.

Maybe Notification Services[^] can help you get to a solution.
 
Share this answer
 
Why won't a time answer your question?

If you create a trigger on the modified database table and set a datetime field indicating the latest database changes and have a timer monitoring that datetime, you'll be able to 'find' the changed records.

You may also want to use an async timer (System.Threading.Timer) to 'poll' the database for changes and raise an event when a change is found.

Good luck,

Eduard
 
Share this answer
 
thanks Abhinav S and thanks Eduard
let me explain what i'm looking for:
suppose,i have a table with following fields:

Name | Price
____________
A | 200
B | 100
C | 300
.
.
.

1-it have more than 10000 records.
2-the records always changing their data.

the problem is the way for changing the output on UI(for example DataGridView).

i have to get only the updated records ,then update them on the UI.(not to update all my UI(DataGridView))
hope it clear because of my poor english :)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900