Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Duplicate numbers
Message
De
16/03/2010 15:27:43
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Duplicate numbers
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01454921
Message ID:
01454921
Vues:
107
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform