Skip to Content
Former Member
Oct 18, 2007 at 03:12 AM

Concurrency problem


I have a dialog program, which able to insert some record into database. In the table, the key field is number which increment 1 each time users create record + short description. When save, currenct machanism will get the last no from database and then insert into table. But if two or more users save at the sametime, the no will be same, but the short description is different, due to the key field is no + short desc, so it can insert successful, but now, user want to change the number must unique no. because the table currenly in use, so, i can't change the table of number field as unique key, how can i solve the problem. Thanks!