G
Geoff Murley
In a SQL Server 2000 Database I have a Table which is
shared by many users. I have a VB.NET Procedure which
contains many calls to Stored Procedures and ADO.Net
Commands to clear and update this shared table. What I
would like to do at the start of this lengthly procedure
is to place an exclusive lock on the table until the whole
procedure has finished running all its separate update
statements. Then I will unlock it. If another user runs
the same procedure while the table is locked by the first
then I would like a message displayed to say that "the
table is in use, Please try again later." Is there an
easy way to achieve all of this? It would be difficult to
put all the update commands in the same transaction as
different connections are used.
shared by many users. I have a VB.NET Procedure which
contains many calls to Stored Procedures and ADO.Net
Commands to clear and update this shared table. What I
would like to do at the start of this lengthly procedure
is to place an exclusive lock on the table until the whole
procedure has finished running all its separate update
statements. Then I will unlock it. If another user runs
the same procedure while the table is locked by the first
then I would like a message displayed to say that "the
table is in use, Please try again later." Is there an
easy way to achieve all of this? It would be difficult to
put all the update commands in the same transaction as
different connections are used.