Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Duplicate numbers
Message
From
16/03/2010 15:27:43
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Duplicate numbers
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01454921
Message ID:
01454921
Views:
106
Help. . . I have a little table which provides the next barcode number but I can't stop getting a duplicate number over the network. Sometimes when two or more people are using the system and generating new barcodes, we get duplicate numbers. Here is my barcode numbrs code :
local nBarc
select barcno   && table with barcode number
nBarc=barcno.barcno  
IF nBarc <= 0
	MESSAGEBOX("This computer is not setup with barcode numbers","")
	RETURN
ENDIF 	
replace barcno with nBarc+1  &&increase by one
FLUSH in barcno force   
IF USED("barcno")    && clos the table
	USE IN barcno
ENDIF
IF NOT USED("barcno")  && open the table 
	SELECT 0
	USE barcno
	
endif		
Any quick fixes ???
Cheers. Shafid
Next
Reply
Map
View

Click here to load this message in the networking platform