hi,
i am developing a multi user database application using vb.net and
sql server 2000/2005.
for example, five user is working on sales module, for the first time
every one is getting bill no : 1
which is max no of the sales table. at click of "save" button, i have
written like any one has saved the
current bill, if yes then i am incrementing the bill no by +1 after
again getting max no of the sales table
and saving the bill/record. also i am checking meanwhile any user is
saving the bill then again i am
incrementing the bill no by +1 and saving the bill/record, means it
is in the loop. But still some time bill no
is being duplicated like i am getting two records/bills for the same
bill no.
i want to lock the table for fraction of time while saving the data.
Developer