Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Duplicate numbers
Message
From
16/03/2010 22:20:29
 
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:
01454987
Views:
42
Hi Jim, thank you for your help. I changed the code with rlock() and it seems to work now. I think your code is much tidier. I found that if I don't close the files, the number does not change sometimes ???
IF USED("barcno")
	USE IN barcno
ENDIF
IF NOT USED("barcno")
	SELECT 0
	USE barcno
endif		
select barcno 

nBarc=barcno.barcno  
IF nBarc <= 0
	MESSAGEBOX("This computer is not setup with barcode numbers","")
	RETURN
ENDIF 
IF RLOCK('barcno')	
	replace barcno with nBarc+1
	UNLOCK
else 
       MESSAGEBOX("The barcodes numbering file is in use, plese try again","")
	RETURN
ENDIF 	
FLUSH in barcno force
IF USED("barcno")
	USE IN barcno
ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform