Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with
Message
De
27/09/2005 09:00:39
 
 
À
27/09/2005 07:35:55
Daryl Dunkley
Pegasus Software Limited
Kettering, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01053363
Message ID:
01053387
Vues:
16
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform