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:30:34
 
 
To
30/08/2010 04:18:15
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:
01479168
Views:
48
>>
>>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).

Thank you Antonio. The values in the array are:
1526
"Connectivity error: [Microsoft][ODBC Visual FoxPro Driver]Syntax error."
"[Microsoft][ODBC Visual FoxPro Driver]Syntax error."
"37000"
200
3
.NULL.

I am not sure what the syntax error may be. I'll continue tomorrow. It's 3:30am here.

Thanks a lot for the help.

Alex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform