>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])
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)
loObj.Database = lcDBC
ENDIF
ENDIF
NEXT
ENDIF
Erik Moore
Clientelligence