Hi Naoto,
This feels like the sort of temporary error state sometimes seen with asynchronous or shared connections... except that SQLConnect is not shared, ASYNCHRONOUS false and BATCHMODE true. So SQLEXEC should never return 0 (still executing)... but if it did, this code will call that an error. Perhaps isolate SQLEXEC's 0 return separately, in case that's somehow the cause:
nRet = SQLEXEC(m.hConn,"SELECT * FROM dbo.SYSCONF","RV_Sysconf")
if m.nRet=0
Error "Database asynchronous SQLEXEC should not have occurred"
Else
IF nRet < 0 THEN
local laError(1)
aerror(laError)
Error Transform(laError(1,1))+": "+laError(1,2)+NVL(": "+laError(1,3),"")
ELSE
USE IN (SELECT("RV_SysConf"))
ENDIF
endif
Also I'd recommend using AERROR() to try to refine any ODBC error return... elements 4, 5 and 6 could give you an "aha" moment.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us."
-- Shakespeare: Coriolanus, Act 1, scene 1