Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data sessions
Message
From
20/02/2005 20:43:10
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Data sessions
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00988741
Message ID:
00988741
Views:
87
Hi:

I guess there's something I don't understand about data sessions. I thought you could access the same table in two data sessions.

So why am I getting a 'file in use' error in the following scenario?
*test.prg

CLOSE ALL
susp
loPinfo = NEWOBJECT('testclass','c:\agri\poult\psys30\testclass.prg')

* we're in data session #1

x = lopinfo.testmethod()

* back to data session #1

<b>*the next line generates a 'file in use' error</b>

SELECT fm_cpprim ;
	FROM flckmast ;
	WHERE fm_flcode = 'BAA12046'
	INTO CURSOR CURS1

RETURN
*testclass.prg

DEFINE CLASS testclass AS SESSION

	NAME = "testclass"

	PROCEDURE testmethod

* we're now in data session #2

	SELECT fm_cpprim ;
		FROM flckmast ;
		WHERE fm_flcode = 'BAA12046' ;
		INTO CURSOR Curs8

	RETURN 0

	ENDPROC

ENDDEFINE
Thanx --

Yossi


Next
Reply
Map
View

Click here to load this message in the networking platform