>If I use the set datasession to command then the select from my temporary cursor in the default datasession will also be placed in the default datasession then when my form again gains focus the datasession will change back to the form's datasession and neither of the cursors will be visible to the form.
Sorry I wasn't very clear. You just switch there to get data into something like an array, directly to lookup listbox etc (dbf('cursor') is likely to fail) and return to your own session. Here is a sample assuming a lookup wouldn't have more than 65000 elements :
* SQL server querying routine returned data to 'myCursor' which is in default datasession
lnsession=set('datasession')
set datasession to 1
select myCursor
afields(aStruc)
copy to array arrTemp
set datasession to lnSession
create cursor crsList from array aStruc
append from array arrTemp
with this
.RowSourceType=6
.RowSource = 'crsList'
.Columncount=3
.ColumnWidths='50,300,50'
endwith
Cetin