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

You need to lock the record before attempting to change.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform