Hi Dan.
>The problem is that I am attempting to use "Set Database To" but it appears that the "Set Database To" is not respecting the data session. There are times that I am setting Database to a database in another data session.
The problem with SET DATABASE TO when you have multiple copies of the same named DBC open is that unless you specify a path, it'll select the one that was opened last, regardless of the datasession. For example:
set datasession to 2
open database \TEST1\TESTDATA
set datasession to 3
open database \TEST2\TESTDATA
set datasession to 2
set database to TESTDATA
? dbc()
(This code won't run as is, since it expects these datasessions already exist, but shows the problem).
The solution is to specify the complete path to the DBC in the SET DATABASE command ie. SET DATABASE TO \TEST1\TESTDATA.
Doug