Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
On error
Message
De
21/03/2003 17:02:32
 
 
À
21/03/2003 16:51:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00768753
Message ID:
00768804
Vues:
22
>>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?
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform