Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error handling
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00662861
Message ID:
00663291
Views:
14
Hi,
Thank you. I have go thru your sample code and declare llError as you mentioned. However, it still not work. Here is my code:
PROCEDURE CheckFileIsInUse
LPARAMETER tcDBName

LOCAL lcCurDB, laTables[1], lnTableNum, lnCount, lcONERROR, llInUse
PRIVATE llError
lcCurDb = DBC()

lcONERROR = ON("ERROR")

llError = .F.
ON ERROR llError = .T.

SET DATABASE TO (tcDBName)
lnTableNum = ADBOBJECTS(laTables, "Table")

FOR lnCount = 1 TO lnTableNum
	llError = .F.
	USE (laTables[lnCount]) EXCLUSIVE ALIAS tmpCheckTable IN 0
	
	llInUse = llError
	
	USE IN SELECT("tmpCheckTable")
	
	IF llInUse
		EXIT
	ENDIF
ENDFOR

SET DATABASE TO (lcCurDB)
ON ERROR &lcONERROR

RELEASE llError

RETURN llInUse

ENDPROC
Please advise

Thank you
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform