Peter,
You always can check for aa[1,1] or aa[1,2] to get the error number and error description. Like:
if aerror(laError)>0 and laError[1,1]=1466 && VFP error number
?laError[1,2] &&Connection handle is invalid
endif
You could filter out other error as well
>Hi Yuri,
>
>I already have the aerror() information at that point. My coding is something like this:
>
>on error do logerror
>
>procedure logerror
>
>=aerror(laError)
>=sqlexec(gnHandle, "insert into logtable...")
>
>The problem with this coding is that =sqlexec(gnHandle, "insert into logtable...") may generate error if the error which has trigger on error routine is caused by connection problem. So, I want to have a checking before I execute that statement:
>
>on error do logerror
>
>procedure logerror
>
>=aerror(laError)
>if no connection problem */ this is the part I cannot figure how to code this
> =sqlexec(gnHandle, "insert into logtable...") */ sql server table
>else
> insert into logtable */ foxpro table
>endif
>
>
>Thank you for your help,
>
>Peter
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only