Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLEXEC and ON ERROR.
Message
De
14/01/2003 10:04:02
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
 
 
À
14/01/2003 08:55:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00741381
Message ID:
00741424
Vues:
29
Tim

You need to check the return value of sqlexec() if < 1 then call aerror().

If you want to use a udf then you can make the variables private instead of local.



>Ok, It seems the SQLEXEC does not fire the current ON ERROR routine.
>Just fixing up the application for Oracle Cluster Servers and when a server dies an error will be reported in the application that I need to trap and
>then recconect (then it will route me to the next server.) Problem is I wrote. SQLEXEC() all over the place.
>
>I suppose I could write a function...
>
>FUNCTION EXECUTESQL
>LPARAMETERS lnHandle,lcSQL,lcCursor
>
>But the problem is the Bind Variables become out of scope for example in this piece of code:
>
>LOCAL lcDB
>
>lcDB='STYLES'
>SQLEXEC(ConnHandle,'update styles set db=?lcDB','mytable')
>
>Again I could find all the bind variables anywhere and make them PRIVATE
>but that is an error prone job.
>
>Is there anyway you can get the ON ERROR or form error to fire when
>SQLEXEC() returns an error?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform