Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi all,

 

 

I'm making my first network shared database (disconnected):

 

I have this question:

 

Is there a way of detects when changed were made in the Database (Table) and update my UI, I mean, Real Time Interfase but still disconnected.

 

I tried using an DataAdapter with events, and I checked the event RowUpdated but it doesn't work as I want.

 

Thanks

 

Mike

Mikecrosoft.Net
  • *Experts*
Posted

No, there's nothing built into .NET that will detect changes to the Database and refresh your client.

 

I'm not sure the type of app you have - maybe this is a requirement. Generally, for data entry apps, you assume data hasn't changed until the user goes to save the data. Since the user's screen might be "stale" (someone else might have updated the same record since the time the user first got it), you'll have to take care of how you handle the second update. You'd also have to have a way to determine if the above actually happened. Generally, you can store a date/time stamp in every record. When you retrieve a record, keep the date/time stamp handy and compare that to the date/time stamp on the record just as you are about to do the update. If they're the same, no one has updated the record since you touched it - otherwise you'll have to handle it.

 

Developing a scheme for the above is hard enough. Trying to have the DB server alert your app when data has changed seems downright nasty. Now, if the DB is a local DB (say, Access running locally), then it becomes a lot easier - relatively :)

 

-nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...