Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Duplicate numbers
Message
 
To
16/03/2010 15:27:43
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01454921
Message ID:
01454928
Views:
53
Shafid,

You can use a record lock to insure the barcode number is not duplicated. Example code is below (untested just use as an example).
LOCAL lnBarc
SELECT barcno   && table with barcode number
IF Barcno <= 0
   MESSAGEBOX("This computer is not setup with barcode numbers","")
   RETURN
ENDIF 	
DO WHILE NOT RLOCK()
ENDDO
lnBarc = Barcno.Barcno  
REPLACE Barcno WITH Barcno+1  &&increase by one
UNLOCK
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform