Visual Basic .NET Forums  
Click here to advertise with us

Go Back   Visual Basic .NET Forums > Database > Database General Discussion

Database General Discussion General discussion on database related topics

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-01-2009, 2:28 AM
VB.NET Forum Enthusiast
.NET Framework: .NET 3.0 (VS 2005/2008)
 
Join Date: Feb 2009
Age: 23
Posts: 45
Reputation: 15
witecloner is on a distinguished programming path ahead
Default Resend Datasource while user has update/insert data

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-04-2009, 10:52 AM
VB.NET Forum Enthusiast
.NET Framework: .NET 3.0 (VS 2005/2008)
 
Join Date: Feb 2009
Age: 23
Posts: 45
Reputation: 15
witecloner is on a distinguished programming path ahead
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 8:24 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2


For advertising opportunities click here.