4 Replies - 3763 Views - Last Post: 06 February 2010 - 02:29 AM Rate Topic: -----

#1 eURe   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 50
  • Joined: 27-October 09

Update Datagridview in multi-user environment

Posted 01 February 2010 - 08:00 PM

Hi There;

I have an application that work in multi-user environment. Would like to know what are the possible way to update the datagridview in other user workstation once someone did the changes?

For instance, when user A had done some Add/Update/delete for a record, datagridview that work by user A can be reloaded to reflect the changes, but what i can do so that other user that work on same appliation to get the datagridview refresh/reload automatically?

Note: Application work in C# and SQL server 2005 as backend

Thank you....

Is This A Good Question/Topic? 0
  • +

Replies To: Update Datagridview in multi-user environment

#2 janne_panne   User is offline

  • WinRT Dev
  • member icon

Reputation: 428
  • View blog
  • Posts: 1,047
  • Joined: 09-June 09

Re: Update Datagridview in multi-user environment

Posted 02 February 2010 - 03:40 AM

This is a guess but you should take a look at SqlDependency class, it might be able to do what you want. I have never used it so can't help with that any more:
http://msdn.microsof...dependency.aspx

Quote

SqlDependency is ideal for caching scenarios, where your ASP.NET application or middle-tier service needs to keep certain information cached in memory. SqlDependency allows you to receive notifications when the original data in the database changes so that the cache can be refreshed.


Also another way would of course be to query the database every second and check if data has changed since last query.
Was This Post Helpful? 0
  • +
  • -

#3 eURe   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 50
  • Joined: 27-October 09

Re: Update Datagridview in multi-user environment

Posted 02 February 2010 - 07:17 AM

View Postjanne_panne, on 02 February 2010 - 02:40 AM, said:

This is a guess but you should take a look at SqlDependency class, it might be able to do what you want. I have never used it so can't help with that any more:
http://msdn.microsof...dependency.aspx

Quote

SqlDependency is ideal for caching scenarios, where your ASP.NET application or middle-tier service needs to keep certain information cached in memory. SqlDependency allows you to receive notifications when the original data in the database changes so that the cache can be refreshed.


Also another way would of course be to query the database every second and check if data has changed since last query.


Thanks for your suggestion :)

In fact i m working on Window Form..

Also, establish connection, open connection, quering then close connection would be expensive... it's likely will cause the performance issue to work on others?

This post has been edited by eURe: 02 February 2010 - 07:21 AM

Was This Post Helpful? 0
  • +
  • -

#4 eURe   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 50
  • Joined: 27-October 09

Re: Update Datagridview in multi-user environment

Posted 03 February 2010 - 06:54 AM

Any other thought to help me out? :(
Was This Post Helpful? 0
  • +
  • -

#5 eURe   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 50
  • Joined: 27-October 09

Re: Update Datagridview in multi-user environment

Posted 06 February 2010 - 02:29 AM

Just try my luck to see if still have anyone have others idea that could share with..

Thank you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1