>>Hi everybody,
>>
>>In a form I call a method of the application object, that opens a cursor in a default DS. Is there a simple way of getting to this cursor's field without switching DS in code using SET DATASESSION command?
>>
>>Thanks in advance.
>
>If it is in default DS why would you switch? Or you are saying it wrong and current session is another DS? If so you need to switch the datasession or you can use the source.
>Cetin
No, In the form with private DS I call a method of the main application object, that opens cursor in Default DS. I need to access a value from that cursor in the form. The current code uses
set datasession to 1
...
then restores the datasession using saved transform of the set('datasessionID')
set datasession to &lcOldDS
I think it's not a very good code and looking for alternative methods.
If it's not broken, fix it until it is.
My Blog