What exactly do you mean by "a  unique registration ID"?

The fact that this problem is occurring makes it 
sound like an auto incrementing int to me.

You have 2 options:

1 - Let the DB take care of generating the id for you (preferred option)
2 - Synchronize the portion of code that generates the ids and saves the
data.


-----Original Message-----
From: Keshav Murthy Srinivas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 24, 2006 4:56 AM
To: [email protected]
Subject: Multiple saves at same time

Hi,
   
  We have Registration form in our application developed using turbine 2.2,
and on click of save button the data is getting saved  in MS SQL database
and a  unique registration ID is generated in the code and saved in table
and also displayed to the user. The table column in which this ID is stored
is also the Primary Key column. However if the save button is clicked by
multiple users at same time  we are getting exception because of primary key
violation.  My question is how can we avoid getting this exception when
multiple savings happen at same time?
   
  Regards,
  keshav


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to