Information générale
Catégorie:
Codage, syntaxe et commandes
Something to consider if you have an application object. Store the connection handle as a property in the object and use this for all of your SQLEXEC's, instead of establishing and dropping a connection for each SQLEXEC, if that is what you are doing. If your system can stand the extra overhead create an _Access method for the connection handle, this method will test the connection with every attempt to use the connection handle. If the connection is no longer usable because a server went down or ?, the code in the _Access method could be written to either keep trying for a period of time, or point to a new server on the fly.
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement