dear friends,I need to generate invoice number(s). To keep everything easy lets say I need to generate incremental number for each customer- starting with 1 and increment by 1. I cannot use ID column, don't ask why, but for example after delete operations I cannot take ID counter back.I see some new functions of sql2012 and sp's when googling but my problem is:this is a credit card transaction application. invoice number CANNOT be used 2 times, even once, everyone gets into trouble. not using one number twice is very CRITICAL. I cannot emphasize enough how critical it is.I need reliable, known solution that I can trust. it seems to me that as this is a asp.net application and will be under heavy usage possibility of any algorithm that generates number without table locking would cause problems. -at least I think that way, maybe wrong.how can I achieve that ? how do you deal with invoice numbers ? db will be sql2012, all new functions are welcome without compatibility concern. I can use stored procedures or use aspnet code, not important.best regards.
↧