Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with
Message
From
27/09/2005 09:00:39
 
 
To
27/09/2005 07:35:55
Daryl Dunkley
Pegasus Software Limited
Kettering, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01053363
Message ID:
01053387
Views:
6
>yes it does say that. but the class that creates the database is in a private data session and there is no transaction running in this session.
>

A database is not open/create within a datasession, but globally,
because when the datasession is released, the database is not closed,
and it go into the other datasessions. This is by design.
CLEAR
CLOSE DATABASES ALL
LOCAL loCrtDB
*BEGIN TRANSACTION 
loCrtDB = CREATEOBJECT('clscreatedatabase')
loCrtDB.createdatabase()
? 
? "session :",SET("datasession"),"#databases :",ADATABASES(adbc),adbc[1]
*END TRANSACTION
RETURN 

DEFINE CLASS clscreatedatabase as Session
	PROCEDURE createdatabase()
		CREATE DATABASE c:\tempdb
		PRIVATE adbc
		? "session :",SET("datasession"),"#databases :",ADATABASES(adbc),adbc[1]
	ENDPROC 
	
ENDDEFINE
To create a database, doesn't have then, to exist some open transaction.

The only solution is to improve CREATE/OPEN DATABASE with a PRIVATE clause
* with PRIVATE the database is open only in this datasession
CREATE DATABASE dbcfilename PRIVATE
>sorry i forgot to describe that bit.
Previous
Reply
Map
View

Click here to load this message in the networking platform