0

I have a centralized database and 2 (or more than 2) users who have access to it working simultaneously. When USER1 logs in all data from database is fed in a dataset and user uses the dataset to get the data. Now the Location table has 5 entries/location names. Meanwhile USER2 adds a location (Chicago) to database. Now I want to have access to the new location (Chicago) in USER1 system.

Do I need to use triggers for this? Or shall I try for threads?

Let me know if this is not feasible way of operating application. Any additional and relative information is welcome.

I don't have enough knowledge to understand all this and I am just going through learning phase in all these techniques, technologies and concepts. Sorry if it is a dumb question.

Sandy
  • 11,332
  • 27
  • 76
  • 122

2 Answers2

1

You can register for Sqldependency in sql server.

Refer Change Notification with Sql Server 2008

http://www.codeproject.com/Articles/12335/Using-SqlDependency-for-data-change-events

Community
  • 1
  • 1
Romil Kumar Jain
  • 20,239
  • 9
  • 63
  • 92
1

Define database based dependency between clients, clients can subscribe to database so when data changes all its dependents are notified. It is called sqldependency notification, it uses service broker. Check the link.

http://www.codeproject.com/Articles/144344/Query-Notification-using-SqlDependency-and-SqlCach

apprich
  • 144
  • 7