Hello All
I am doing registeration process
there is 2 tables
1. client
2. serial (has a field with last client no.)
I want to add new client in client table , its number is last client no. +1
what i already did as follows
1. html form for user information
2.
jsp confirmation page (gets data from the previous page)
it access serial table and gets last client no.
it has submit button that add new client to client table
3. jsp page to modify serail table with the new customer no
this works fine when single user
test it
but when many user try to register an error happen
because the second step is wrong , may be 2 or more clients gets the same last clien no. , and then when they submit a duplication may happen
i want to know a better logic for this problem
Thank you all in advance