Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot open table
Message
From
13/04/2022 15:56:52
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
 
To
13/04/2022 14:36:38
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01684162
Message ID:
01684167
Views:
52
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
        *
        * some other stuff happens here.
        *
        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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform