Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary Key generation via ODBC
Message
From
05/05/1999 17:40:26
 
 
To
05/05/1999 06:59:13
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00210160
Message ID:
00215537
Views:
24
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform