i have created a database for my companies stock system in SQL Server 2005.
when there are stock movements (i.e. we despatch or receive stock) we need to adjust the stock record for the product being despatched / recieved.
i need to make sure that this stored procedure is not run more than once at the same time.
would using the following be sensible?
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
Further to this.. do you HAVE to have all the code in a stored procedure within the BEGIN TRANSACTION.... COMMIT TRANSACTION? or just the section of SQL that related to updating the stock record.