SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL trigger to avoid real time registration errors


SQL trigger to avoid real time registration errors

Author
Message
Jeev Oberoy
Jeev Oberoy
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 30
hi all,
i have create a form(web app) to register customer details with "Submit" button.Once i click button "New" the registration form
will appear with new generated Account Number.after fill form click submit to save into SQL server database..
While one customer register his details another customer from other place Click button "New" to make registration.
so same Account Number will generated and build problem when both click "Submit" button at same time.
how could i prevent this problem ?
if i use locking method to lock Account Number when click "New". Is this possible?
shield_21
shield_21
SSC-Enthusiastic
SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)

Group: General Forum Members
Points: 139 Visits: 396
Hi there,

As i understand, this happens because Account Number is already displayed while the record is not yet saved.. I'm just going to suggest solution to avoid this problem.. :-P

Instead of displaying it immediately, you can put the word "Auto-generated". Then, after saving the record, you can display the generated Account Number..

I disagree with locking method when clicking "New" since only one user at a time would be able to fill up their information.. Furthermore, it would also take time completing the information before they save the record..

I hope this helps.. :-)

Welcome to sqlservercentral!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search