Resend Datasource while user has update/insert data

witecloner

Well-known member
Joined
Feb 12, 2009
Messages
45
Programming Experience
Beginner
Sorry if post @ a wrong thread. i don't know how to ask for my problem, so i explain it using case example.

basic information.
- Both of database and application stay on server computer.
- the database server i' using is mysql.
- i use datagridview control to display the resultset of data.


user 1 : using the application @ 9.00PM and where the record count @ table is 10 records, and display it through datagridview control, and stay use this resources.

user 2 : using the application @ 9.05PM and insert a record @ the same table which user 1 using now, @ user 2 the record on datagridview is 11 records now.

The question is : How to make user 1 also can accept the new record which user 2 has inserted. em... i want @ user 1 datagridview control also collect 11 records while user 2 inserted new record to the table.

@ that case i try using timer control, where @ 10 second the application will doing a process to reload database record. The algorithm of that process are like these, "If record.count @ table <> record.count @ datagridview then reload the datagridview, else if record.count @ table = record.count @ datagridview than check the record timestamp. if the record has a same timestamp (apps and database) then nothing, else update the datagridview.

Can anyone tell me another way to do these?

Perhaps me, my english language is very bad :), hope all of your will understanding what's my question.

Thank's
 
Thank's all. I have found the solution of my problem. but i don't know how to explain it. the main is i use FileSystemWatcher class to monitoring a file (call it File.Mon). When i update/insert/delete a record the process will also write a bit like 0 or 1 to that file (file.Mon).


Thank's
 
Back
Top