>>Oh, I see. That does present a bit of dilema. Have you tried putting your looping code for the sessions in an object and using that objects Error event to set a flag? That has a chance of working, but I haven't tried it.
>
>well, i could not get it to work. i tried your solution - same negative result, and i tried the following:
>FOR loop1i=1 TO MaxLoop
> *GotError = .F.
> SET DATASESSION TO loop1i
>?STR(OldSession) + STR(SET("datasession")) + STR(loop1i)
> IF SET("datasession") <> OldSession
> * *** existing datasession
> MaxLoop = MaxLoop + 1
> ReturnValue = ReturnValue + 1
> DIME ArrayPointer(ReturnValue, 1)
> ArrayPointer(ReturnValue, 1) = loop1i
> OldSession = SET("datasession")
> ENDIF
>ENDFOR
>
>but the interesting thing is that unlike outside of my error trap, inside of it 'SET DATASESSION TO #' doesn't set didlely zip, therefor no comparing of previous and current DS. RRRRRRRRRRRRR - there just has to be a solution!
Seems like you've reached an impasse. The object.Error() that I had mentioned does say it doesn't fire if there's an ON ERROR on the stack, so it does look like you can't get there from here.
What are you trying to accomplish with this error handling? Are you trying to make sure things are flushed out of all open datasessions? What?