>>By default DS I meant the DS the VFP runs. In other words, in the main program we instantiate the main application object. All methods of this object will instantiate cursors in the main DS (default).
>>
>>Anyway, I see that there is no other way except for switching - I'll adjust the code to use DS number directly (without a macro).
>>
>>I can not use other methods, because I don't want to change the application object method.
>
>If cursor size is small having a copy as ADO, XML, array would be a simple solution (or doing that on demand), If cursor size is big then maybe you would want to create tables instead in sys(2023) and have their aliases in an array along with the names of aliases. Having tables no switch would be needed.
>Cetin
I think the cursor is small, but I don't want to change the method of the application object.
If it's not broken, fix it until it is.
My Blog