.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

About insert query and auto number generation algorithm

Posted By: Karthick     Posted Date: September 21, 2011    Points:5   Category :Sql Server
In my project am using receipt number which is auto generated. in client system if anybody saves the reciept it will check the receipt no if it already created, it will automatically insert next number. but if both the client saves record at a time , it saves both the record with the same number, anybody knows please reply as soon ..
Thanks in advance...

Author: Narayanan             
Posted Date: September 21, 2011     Points: 20   

Try this way..
Set receipt no as a Primary key in your database.if you set a primary key .It does not allow Duplicate entries.

Regards, Lakshmi Naraayanan.S

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend