Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Duplicate numbers
Message
De
16/03/2010 17:30:19
 
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:
01454959
Vues:
41
>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
>
Is it possible that another user would not see the updated value after you've done that or will everybody having the table open get a refreshed version when the lock is released?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform