>>>I have a form (lets say form1) that creates a temporary cursor from 3 source tables. Then I have another another form (form2) that needs to see that temporary cursor but not see the three source tables. So if I setup form1 to have a separate data session to hide the source tables, how can I get form2 to see that temp cursor created by form1? Changing how my data sessions are setup is an option if necessary. Any ideas? TIA!
>
>>OIC.
lnId = thisform.datasessionId
>>set datasession to form2.datasessionId
>>* Utilize cursor
>>set datasession to lnId
Cetin
>
>So ok, that gives me access to the cursor, but does not help solve my problem. I need form2 to actually *see* the temp cursor because it needs to run other queries in it's own data session that use the temp cursor created by form1 as a data source. I guess this defeats the purpose of private data sessions and therefore I can not do it?
Roxanne,
You could do it :) I've found two ways.
1)
open database mydbc
create sql view myview ;
as select * from mytable
drop view myview
open database mydbc
use mydbc!myview in 0 alias test
select test
browse
2)* Form2 selects SQL into cursor mycursor
* Form1 gets a copy
lnId = thisform.datasessionId
set datasession to form2.datasessionId
cDBF = dbf("mycursor")
set datasession to lnId
use (cDbf) in 0 alias myCopyCetin