Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data sessions
Message
De
20/02/2005 20:43:10
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Data sessions
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00988741
Message ID:
00988741
Vues:
88
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


Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform