Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening up tables in a datasession
Message
De
04/02/1999 13:07:52
 
 
À
04/02/1999 10:57:54
Noman Aftab
Embry-Riddle Aeronautical University
Daytona Beach, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00183602
Message ID:
00183969
Vues:
15
>Yup they are empty but I am trying to open up different databases with same contents and if I do
>cdataname = dbc()
>dataenvironment.closetables
>dataenvironment.setall = ('database', cdataname, 'cursor')
>dataenvironment.opentables
>
>Then it sets the database property as the current database location and thinks as if freetables in the database also.
>
>Is it possible if I remove the freetables from the data environment and open them up in the private datasession where data environment opens up?
>
>How can I have both of them opened at the same time and also I would be able to switch between databases.
>
>THANKS.

Instead of SetAll, use some code like the following to set your database property:
PROCEDURE ReDirectDE

=AMEMBERS(laList, ThisForm.DataEnvironment, 2)
IF EMPTY(laList[1])
     *** Nothing in DE
     RETURN
ENDIF

lcDBC = DBC()

IF ALEN( laList,1 ) > 0
	FOR i = 1 TO ALEN(laList,1 )
	     loObj =  EVAL("ThisForm.DataEnvironment."+laList[i])
	     IF LOWER(loObj.BaseClass ) = 'cursor' 
	          IF !EMPTY(loObj.Database)
	                *** Contained Table
	               loObj.Database = lcDBC
	          ENDIF
	     ENDIF
	NEXT
ENDIF
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform