Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it possible to use SQLPT on local tables?
Message
De
30/08/2010 04:18:15
 
 
À
30/08/2010 03:59:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01479151
Message ID:
01479164
Vues:
56
>
>Avanzando,,, I created a DNS with the VFP ODBC driver as you suggested and added a connection to the second DBC pointing to the new DNS. The connection tested succesfully, but the following test code does not seem to work.
>
>
>SET DATABASE TO dacilsa
>lnhandle = SQLCONNECT('coneccion_dacilsa')  && lnHandle = 3
>lcCommand = [UPDATE Accounts SET Desc = ALLTRIM(Desc) + ' cambiado' WHERE Number = '100 ']
>?SQLEXEC(lnhandle,lcCommand)  && Returns -1
>
>
>What can be the problem?
>
>Alex

Is Number a character column?

Anyway, you can check the error report from the ODBC driver by inspecting the error array after an AERROR().
LOCAL ARRAY laError(1)
... your code ...

IF SQLEXEC(m.lnHandle,m.lcCommand)=-1
  AERROR(m.laError)
  IF m.laError(1,1) = 1526  && ODBC generated error
    FOR m.lnLoop = 1 TO ALEN(m.laError,1)
      ? m.laError(m.lnLoop,3)
    ENDFOR
  ENDIF
ENDIF
(not tested - see AERROR() in Help for more details).
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform