Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Switching DataSession's
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00968641
Message ID:
00968766
Views:
7
i've tried to form.enable=.f. - makes no difference.

to pass the table name to the method would not work either, because i am obviously not in the correct ds, and the fox would not find the table again.

because the debugger is obviouly lying, i've changed my 'ds switching' block to the following:
WAIT WIND TRANS(SET("datasession"))   && shows 1
IF TYPE("_screen.ActiveForm.DatasessionId") = "N"
	CurrentDS	= SET("datasession")
	CallingFormDS	= _SCREEN.ACTIVEFORM.DATASESSIONID
	_SCREEN.ACTIVEFORM.ENABLED = .F.
	IF CallingFormDS <> CurrentDS
		ResetDS = .T.
		WAIT WIND   && this shows too
		SET DATASESSION TO &CallingFormDS
	ENDIF
ENDIF
WAIT WIND TRANS(CallingFormDS) + ", "+ TRANS(SET("datasession"))   && shows 2, 1
so, obviously the ds does not get switched; question is why, both ds are available, the private ds form is active, visible, etc.

so - i don't get it.


>I meant the alias or the table name, whatever you needed.
>
>You said that the alias name was correct and I've done session changing [though the manual does say it should not be issued when a form is active].
>
>hmm, maybe the form holding the datasession needs to be inactive? It could be that being in the debugger makes the form inactive.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform