Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute Store Procedures one at a time

Status
Not open for further replies.

Azzuri

Programmer
Apr 16, 2002
18
CA
Hello,

I am building a record locking script that uses a store procedure to lock records in a table. I would like to know if store procedures get executed one request at a time. This is important because I cannot have two users accessing the same record at the same time. I need to make sure the store procedures executes a request, finishes a request, and then takes another request.

Any help is appreciated.

Thanks,
 
Can we see the statement in your stored procedure that's accessing the record? I would advise you to group your statements in a transaction and set the isolation level for the transaction; hold the lock for the length of the transaction. You may have to wait in a loop of for a period of time until the locked resource is released.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top