Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I am developing my windows application in .net 3.5 .now i have a small doubt in my billing form .in my application i set sl no as auto increment by seting the property "identity specification".its working and shows the result starting from 1 to continues when i debug the application at first ,next time it shows Max(slno+1) like wise .but i need sl no starting from 1 in each case of billing.

i am waiting to favorable replay
thanks i advance
Posted
Updated 4-Feb-11 22:48pm
v2

1 solution

Nope. It don't work like that.
When you specify an Identity is becomes a field which is controlled by the database system and is unique for the whole of that table.

You cannot have two identical Identity values; It would be like having two identical serial numbers on banknotes: Things start to go very wrong very quickly when people notice!

If you need sequential numbers in your billing form, you will have to create them yourself for each row.
 
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