Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error handling
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00662861
Message ID:
00663291
Vues:
13
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...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform