Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File Locking
Message
 
To
21/01/2001 23:46:47
Agnes Cheng
DynamicTech Consultants Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00466456
Message ID:
00466503
Views:
10
>>>>>>>>>>>>
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
Previous
Reply
Map
View

Click here to load this message in the networking platform