handling Concurrency in SQL SERVER 2005

Posted by sameer on Stack Overflow See other posts from Stack Overflow or by sameer
Published on 2010-04-30T11:09:07Z Indexed on 2010/04/30 11:17 UTC
Read the original article Hit count: 305

Filed under:
|
|

Hi,

I have one question for you, if you can answer and refer resource it will be great help.

I have a scenario where i need to create a appointment slot and a serial no for each slot memberwise.

ex:

Member Id |App Slot #

1|1

1|2

2|1

2|2

1|3

what im doing is take the Max slot number,increamenting it and insert it memberwise. but the problem is concurrent user can create a slot when i take the max slot after that if any other user insert the slot the value that im working with is no more valid, how to over come this problem

Thanks & Regards,

Sameer

© Stack Overflow or respective owner

Related posts about sql

Related posts about server