>Use a Application level variable as your incremental value.
>(Select MAX(increment) FROM yourtable at application startup.)
Gene,
I've posted on the SQL forum with no reply. Maybe you can help.
I've got a MS SQL Server stored procedure that gets the next available check number from the checkbook file and increments. I'm trying to keep the locks down to a minimum because other efforts of this type have to be done at night cause of problems. The code is something like:
Update checkbook
Set @nextnum = nextchknum
nextchknum = nextchknum + 1
where checkbook = @chkbook
I've used this identical code on other tables without any problems. The problem with the checkbook file is that sometimes it seems to do the incrementing before returning the number, so it skips a number.
Any help appreciated,
PF
(On an infant's shirt): Already smarter than Bush