Hi, I have a question similar to thread183-1370666.
I have two stored procedures. PageCheck reads table PageIndex and sometimes updates a corresponding table, and PageEdit marks records (pages) in PageIndex as "dirty" so when the next read comes in with PageCheck the table gets rebuilt.
I'm afraid these two will be run at the same time so I can lose changes when I have a lot of user activity. I figure I have to put a lock on PageIndex table when I do updates to it and maybe on the corresponding table when a page gets rebuilt. Either that or put a lock on some code in the stored procedure so it gets run exclusively.
Am I right or does SQL Server 2000 work different than I think? Any suggestions on this?
![[elephant2] [elephant2] [elephant2]](/data/assets/smilies/elephant2.gif)
graabein
I have two stored procedures. PageCheck reads table PageIndex and sometimes updates a corresponding table, and PageEdit marks records (pages) in PageIndex as "dirty" so when the next read comes in with PageCheck the table gets rebuilt.
I'm afraid these two will be run at the same time so I can lose changes when I have a lot of user activity. I figure I have to put a lock on PageIndex table when I do updates to it and maybe on the corresponding table when a page gets rebuilt. Either that or put a lock on some code in the stored procedure so it gets run exclusively.
Am I right or does SQL Server 2000 work different than I think? Any suggestions on this?
![[elephant2] [elephant2] [elephant2]](/data/assets/smilies/elephant2.gif)
graabein