Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File Locking
Message
 
À
21/01/2001 23:46:47
Agnes Cheng
DynamicTech Consultants Ltd.
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00466456
Message ID:
00466503
Vues:
11
>>>>>>>>>>>>
My case : I got an invoice form, invheader,invdetail ,invnumber (3
tables).

I want to lock the 'Invnumber' table , Get the newest number , then update
that tables, There are over 20 users to use this forms.

so What syntax / alog. should I write ??

Thanks in advnace.
From Agnes
>>>>>>>>>>>>

I use this code for an invoice number:
Do WHIL !LOCK("INVOICENUMBER")
     Lock("INVOICENUMBER")
Enddo
Stor ALLT(INVOICENUMBER.number) to VAL1
VAL1 =VAL(VAL1)+1
VAL1 = ALLTRIM(STR(VAL1))
Sele INVOICENUMBER
REPL INVOICENUMBER.NUMBER WITH VAL1
=TABLEUPDATE(.T.)
Unlock in invoicenumber
Hope this helps
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform