Alternatives
Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
Generating unique IDs in this context is the job of the database. You shouldn't be trying to manually create the prod_id valueYou haven't mentioned what database you are using, I'm going to assume SQL Server.* You probably have a 'Products' table or something like that. If prod_id is the...
19 Sep 2012mohit jain 3 alternatives
I am using 3 tier architecture for using insert update delete operations..i want to generate number for prod_id in insert operation.plz reply anyone
you can do this by two way 1 ) store your prod_id in global class and increment it by one before insert 2 ) pass your all data(without prod_id ) to database and after that find max existing prod_id from database and increment there in procedure although first method is work fine but...