[Message Deleted]
-
[Message Deleted]
-
[Message Deleted]
There is no built-in way to handle concurrency issues - you must do a number of things for example: 1) Add a timestamp column to each database table 2) When loading a row update/get the timestamp 3) when saving a row compare client-side timestamp with current database timestamp 4) If they differ reject the update (or take appropriate action)
-
[Message Deleted]
PREMSONBABY wrote:
i want to know is there any changes in the sql table, in the database.
The only way to tell, and even this isn't perfect, is to load another dataset with the table your updating, then compare each record to what you have. Any differences will tell you that the data has changed. But, the data can change WHILE you're doing the compare. If you're going to use a disconnected approach like this, you'll just have to deal with the fact that the "last write wins". The last client to write to the database overwrites any and all other changes. Now, under SQL Server, there is what's called Notification Services. This allows your application to subscribe to certain events that occur in your database. SQL Server will then notify you when these events happen and your code can take appropriate action. SQL Server Notification Services[^]
Dave Kreskowiak Microsoft MVP - Visual Basic
-
There is no built-in way to handle concurrency issues - you must do a number of things for example: 1) Add a timestamp column to each database table 2) When loading a row update/get the timestamp 3) when saving a row compare client-side timestamp with current database timestamp 4) If they differ reject the update (or take appropriate action)
[Message Deleted]
-
PREMSONBABY wrote:
i want to know is there any changes in the sql table, in the database.
The only way to tell, and even this isn't perfect, is to load another dataset with the table your updating, then compare each record to what you have. Any differences will tell you that the data has changed. But, the data can change WHILE you're doing the compare. If you're going to use a disconnected approach like this, you'll just have to deal with the fact that the "last write wins". The last client to write to the database overwrites any and all other changes. Now, under SQL Server, there is what's called Notification Services. This allows your application to subscribe to certain events that occur in your database. SQL Server will then notify you when these events happen and your code can take appropriate action. SQL Server Notification Services[^]
Dave Kreskowiak Microsoft MVP - Visual Basic
[Message Deleted]
-
[Message Deleted]
I don't have any public domain NS code I can share. But, there are TONS of examples in the documentation for it.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
[Message Deleted]
The subject line you used IS useless. Everyone who comes here is looking for help, so putting "Help me!" in the subject line doesn't really make you stand out at all.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
[Message Deleted]
PREMSONBABY wrote:
please dont tell that it is not possible or useless
Where exactly did I say waht you are trying to do was "useless or impossible"?? I said your subject line was useless for the reason Dave K described. We also have an SQL / ADO.NET forum here which would have been a better place for this post.
PREMSONBABY wrote:
if u dont know something
I know more than something sonny. I have dealt with this particular issue (db concurrency) many many times and I gave you one (of many) solution to the problem. Dave gave a second. A simple thankyou would have been appreciated!