Ricky White
asked on
How to implement invoice number functionality?
Environment: C#.Net, Sql Server
I need to create an invoice number in an application which is auto generated for each account.
Below are the 2 options I know. Please advise what would be the best approach to implement this functionality.
Options:
1). Identity column
2). Create a table in SQL Server that has just 1 column and 1 row. and insert number 1 in there. Now everytime, I want to create an invoice number I can read the value from this counter table and add 1.
Thanks.
I need to create an invoice number in an application which is auto generated for each account.
Below are the 2 options I know. Please advise what would be the best approach to implement this functionality.
Options:
1). Identity column
2). Create a table in SQL Server that has just 1 column and 1 row. and insert number 1 in there. Now everytime, I want to create an invoice number I can read the value from this counter table and add 1.
Thanks.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks.
I note you also haven't actually told us what format the invoice number is or what requirements it has.