Jyosh
10-22-2004, 01:53 PM
Hi,
I want to find out about locking a table. In a stored procedure, First we are selecting a maximum number and incrementing it and inserting into the table. The stored procedure is called many times in a minute. it is inserting the same number more than 1 time. I think this is happening because, before insert statement is running, the stored procedure is called again. I am trying to lock the table after select statement and release it only after the insert statement. Can anyone tell me where i can find the code for locks.
Thank you,
I want to find out about locking a table. In a stored procedure, First we are selecting a maximum number and incrementing it and inserting into the table. The stored procedure is called many times in a minute. it is inserting the same number more than 1 time. I think this is happening because, before insert statement is running, the stored procedure is called again. I am trying to lock the table after select statement and release it only after the insert statement. Can anyone tell me where i can find the code for locks.
Thank you,