Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary Key generation via ODBC
Message
De
05/05/1999 17:40:26
 
 
À
05/05/1999 06:59:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00210160
Message ID:
00215537
Vues:
25
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform