Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it possible to use SQLPT on local tables?
Message
From
30/08/2010 04:18:15
 
 
To
30/08/2010 03:59:43
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01479151
Message ID:
01479164
Views:
55
>
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform