Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I set my table exclusive
Message
De
18/11/1999 19:06:04
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00292759
Message ID:
00292807
Vues:
19
Nick-

I've added the < pre>/< /pre> tags to your code segment, and ran beatify on it, and cleaned up a couple of unused things to make it easier to read. Take pity on us, many were in 4 hour exams today. < s>

Where is this code located?

If you take out the ON ERROR call, and just USE the table exclusive, what happens?
LOCAL bb, worked, isa

WITH THISFORM
	worked = .T.
	cErrHandler = ON('ERROR')
	ON ERROR worked = .F.

*!*	SET EXCLUSIVE ON
*!*	^^^^^^^^^^^^^^^^
<b>*!*	You don't need the above line.</b>

<b>	SET STEP ON</b>
	USE xtable EXCLUSIVE

	isa = ISEXCLUSIVE("xtable",1)
	cMessageTitle = 'My Application'
	nDialogType = 0

	DO CASE
	CASE isa = .T.
		cMessageText = 'locked'
		WAIT WINDOW ALLTRIM(cMessageText) TIMEOUT 0.5
	CASE isa = .F.
		cMessageText = 'no lock'
		WAIT WINDOW ALLTRIM(cMessageText) TIMEOUT 0.5

	ENDCASE


	ON ERROR &cErrHandler
	IF worked
		bb = '((((((     FILE EXCLUSIVE     ))))))'
		WAIT WINDOW ALLTRIM(bb) TIMEOUT 0.9
		.T1.ENABLED = .T.  && start timer1
	ELSE
		bb = 'oooooo  File Not Free     ooooooo'
		WAIT WINDOW ALLTRIM(bb) TIMEOUT 0.9
	ENDIF
	IF .t2sw = .F.
		.T2.INTERVAL = 25000 && set new timer interval
		.t2sw = .T.
	ENDIF

ENDWITH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform