>I need to check if a particular table is opened in a previously-opened form which has a different datasession from the current form. In VFP7/8 I can use ASESSIONS(laMyArray), but until I can persuade the client to upgrade, I am stuck with VFP6.
>
>Using AUSED(laMyArray,lnDataSession) in a FOR/ENDFOR loop, I can determine the tables open in a particular datasession, but
>a) I don't know when to stop checking datasessions (15 should be enough, but guessing is not very 'neat'),
>b) If the datasession does not exist, the error "Session number is invalid" occurs.
>
>How can I check if a datasession exists or not?
>
>Any help would be appreciated.
>
>Alan
Alan,
I'm away from documentation and do not have VFP6 here to test. When was session object introduced? If not in VFP6 (or you didn't use session object) then the only object having private sessions is form(set)s. Loop that collection, set datasessionId to forms(i).dataSessionID.
Cetin