Concurrency
-
Hi Please dont get upset if u see this message in two places, As it is bit urgent i have posted at two place one is at c# forums and another is at this place How can i handle concurrency in DotNet? I need to update a record into a database table, by the time I will access the record there is a chance that somebody can change the record. I know this kind of problem is common. But never i had an oppurtunity to work this kind of problem. please let me know the solution.
-
Hi Please dont get upset if u see this message in two places, As it is bit urgent i have posted at two place one is at c# forums and another is at this place How can i handle concurrency in DotNet? I need to update a record into a database table, by the time I will access the record there is a chance that somebody can change the record. I know this kind of problem is common. But never i had an oppurtunity to work this kind of problem. please let me know the solution.
Do a search in SQL Books Online for "transactions". More specifically: begin transaction commit transaction and rollback transaction
-
Hi Please dont get upset if u see this message in two places, As it is bit urgent i have posted at two place one is at c# forums and another is at this place How can i handle concurrency in DotNet? I need to update a record into a database table, by the time I will access the record there is a chance that somebody can change the record. I know this kind of problem is common. But never i had an oppurtunity to work this kind of problem. please let me know the solution.
Also, assuming that you're using SQL Server 2000 (or MSDE) have a look at: sp_getapplock sp_releaseapplock In most of the situations where our OLTP system has concurrency issues, I've found app locks to be infinitely more useful than transactions. Transactions (IMHO) should be used for atomicity, not for concurrency issues.
Grim
(aka Toby)
MCDBA, MCSD, MCP+SB
-
Also, assuming that you're using SQL Server 2000 (or MSDE) have a look at: sp_getapplock sp_releaseapplock In most of the situations where our OLTP system has concurrency issues, I've found app locks to be infinitely more useful than transactions. Transactions (IMHO) should be used for atomicity, not for concurrency issues.
Grim
(aka Toby)
MCDBA, MCSD, MCP+SB
This will work..... But i am using Oracle and also i want to handle this at BLL but not in database.