Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot open table
Message
De
13/04/2022 15:56:52
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
À
13/04/2022 14:36:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
01684162
Message ID:
01684167
Vues:
53
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform