Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I set my table exclusive
Message
From
18/11/1999 19:06:04
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00292759
Message ID:
00292807
Views:
20
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
Previous
Reply
Map
View

Click here to load this message in the networking platform