>>>
>>>What is the code returned by SQLExec? -1 would indicate ODBC error. You can use AERROR() to get details about ODBC error.
>>
>>I'll check that out once I've put some records back in the file. Looks useful. How would I use AERROR in this context?
>
>You should always check value returned by all SQL*() functions because it's the only way to know if it has been executed successfully or not.
lnresult=SQLEXEC(hconn,lcsql,"testdata")
>IF lnresult = -1
> * ODBC Error
> AERROR(laError)
> ...
>ENDIF
Thanks Sergey. Will try that. I had tried watching AERROR in the Trace window but that didn't work.
Cheers
Harry