Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Como vaciar ultimo mensaje de error...
Message
From
17/01/2003 09:32:32
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
17/01/2003 09:28:07
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00742850
Message ID:
00742851
Views:
10
This message has been marked as the solution to the initial question of the thread.
>Soy principiante de VFP .. pero
>antes programaba con VB.
>Tengo una pregunta sobre como vaciar ultimo mensaje de
>error..
>Por ejemplo Tengo siguiente codigo. (VFP 5 o 6)
>
>BeginTansaction
> insertar un registro
> verificar mensaje de error
> Si no hay ningun error
> EndTransaction
> Sino
> RollBack
>
>De alli veo la necesidad de vaciar el ultimo mensaje
>de
> error antes de "verificar mensaje de error"
> .. En realidad es como vaciar una variable antes de
> usarla.
>
>En caso de VB lo hacia con : err.clear
> pero no veo cOmo lograrlo con VFP
>
>Gracias por leer este mail.

Entiendo que no hay una orden explícita para vaciar el mensaje de error. El método común es simplemente verificar por un error, si es que había un error.

Algo así:
local llError
llError = .F.
on error llError = .T.
* Hacer algo que podría provocar un error,
* por ejemplo, USE MiArchivo
if llError
  * Copiar información de error con aerror()
  * Analizar con DO CASE
  * o mostrar directamente el número y mensaje de error.
endif
on error
Saludos,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform