Hi KPH,
Thank you for posting in the community! My name is Kevin, and I will be
assisting you on this issue.
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to be notified in your program
when the database changes. If there is any misunderstanding, please feel
free to let me know.
As william mentioned, if you're working on a SQL server as database system,
you can use SQL Server Notification Service to achieve this. You can
download it from the following link, if you already have SQL Server
installed on your machine.
http://www.microsoft.com/sql/ns/downloads/download.asp
Also there are some documentation about the notification service. Please
check the following link:
http://www.microsoft.com/sql/NS/techinfo/productdoc/default.asp
Furthermore, we can take advantage of the concurrency error to achieve
this. When updating the database, if there is an concurrency error, the row
containing the error will not be updated. So we can handle the RowUpdated
event to check the RecordsAffected property. If no records are affected, it
mean the row is changed since the record was selected. Here's an article
with a sample code to test the optimistic concurrency.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconOptimisticConcurrency.asp
Does this answer your question? If anything is unclear, please feel free to
reply to the post. I am standing by to be of assistance.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."