There are a number of ways to solve this common problem.
Read up on the identity data type and the @@IDENTITY function. The identity
data type is intended for this purpose.
I know that you may have trouble modifying an existing application to use an
identity value. You can at least add a unique index on that column of the
table to absolutely prevent duplicate values.
--
Rick Byham (MSFT)
This posting is provided "AS IS" with no warranties, and confers no rights.
wrote in message
> dear sir/madam
> I have made an project in asp with sql server. All database are
> without any primary key.
> In one times many people are doing entry. So there is one field for
> serial number generation and all value of this field should be unique.
> But due to huge amount of entry some times clients entry
> simultaneously and duplicate value enters in the field. Please tell me
> how to stop it. I just want If record of one person is inserting then
> other person record should be in wait so that duplicate entry should
> not be entered
>
> Thanks in Advance
>> Stay informed about: How to stop duplicate entry