Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi All,

I have a table (in sql) that changes a lot in day(like Stock Exchange! ),

I show this table in a datagridview (in Windows forms),how can I refresh the data when it changed?
I don't want it by thread (to check in period),I want it to refresh when the table's updated(like an event or trigger) .

Please Help me.

Thanks in Advance.
Posted
Updated 12-Jul-11 18:43pm
v2

1 solution

You can run .NET code inside newer versions of SQL Server. If you can do that, you can write a trigger that runs .NET code. If you can't, then there's no way for the DB to tell you that data has changed. You need instead to look at the code that does the inserting and updating, and have that also trigger some message to the application. Is this app used only in your network ? If not, then you need to send messages over the internet, I assume ?
 
Share this answer
 

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