Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening up tables in a datasession
Message
From
04/02/1999 13:07:52
 
 
To
04/02/1999 10:57:54
Noman Aftab
Embry-Riddle Aeronautical University
Daytona Beach, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00183602
Message ID:
00183969
Views:
16
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform