Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am creating billing system so biil can be made Locally(offline) or through a remote location (online) and want to

generate a bill number which is meaning full LIKE 1234 & not like NEWID() Which is generating as random number

so identity column to be generated offline as well as online so when data merge through a replication

it may cause a problem if same id is inserted ofline as well as online

Like if 9 value inserted from offline as well as online then it may cause a problem
Posted
Comments
Rakesh S S 28-Oct-12 2:54am    
can anybody with suggestion?
Shanalal Kasim 29-Oct-12 5:24am    
Use different prefix for online & offline bill numbers

Use different prefix for online & offline bill numbers
 
Share this answer
 
it is not practically possible.
else you have to update voucher nos while synchronize local database with online one, and it's not a good way to do this
so,
you should use prefix like Branch id/ branch code for offline as well as online entries
Happy Coding!
:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900