1 Replies - 798 Views - Last Post: 09 April 2011 - 09:09 AM

#1 ozi300  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 09-April 11

Synchronization data in datagrid with database

Posted 09 April 2011 - 04:10 AM

Hello,

I'm writing with question how you doing synch between datagrid and DB? I plan build application which will be used by many customers, but they will use the same database.

I make this clear and simple:
We have two uses:
John and Mark. They both use the same application. John and Mark are on product list. Mark make some change with price as example. Then how force the John datagrid to refresh row that Mark changed?

I'm very couriers how do you that in your programs in .NET environment. For the database layer I user ADO.NET - not Entity Framework or LINQ2SQL.

Thanks for every replay to this post.

Is This A Good Question/Topic? 0
  • +

Replies To: Synchronization data in datagrid with database

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9286
  • View blog
  • Posts: 34,803
  • Joined: 12-June 08

Re: Synchronization data in datagrid with database

Posted 09 April 2011 - 09:09 AM

Is your question how to shuttle data to the database, or how to make someone else's app respond to changes made to a database?

If it's the former then look into 'sql data adapters' and 'sql command' objects. If it's the latter that's more tricky. I would suggest implementing a "locking" system. Where if personA is making changes to table1 then that flips a bit that indicates the table is locked. The application would poll this locking table on a timer to see if it's unlocked. Once it is personB can make changes (after a refresh).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1