>>I'm writing a tool which needs to do a few things on a few tables in... well, it needs to know in which datasession (too late now to rewrite it to work in development - it's already almost there to work at runtime). I need a tool to get me a list of datasessions with their names, just like the VFP's Data Session window shows. Does it cycle through _screen.forms, or is there a more elegant solution?
>>
>>Doesn't need to be for the faint of heart, this is programmers' tool.
>
>Asession() gets all ids into an array and in VFP only session object and forms can have 'DataSessionID'.
>Before VFP6 I was looping forms to find out the sessions. Probably you can use both and have them with 'names'?
It seems the loop is the only way.
I have managed to completely avoid the problem. Instead of offering to pick data from a cursor in an user-selectable datasession, I just gather ALL of the data, from all sessions, so I don't need the names.
At least now I know not to spend time searching next time I may need this - thanks.