Here's the source code which I copy from QUE Book('The One Source for Comprehensive Solutions' by Menachem Bazian)
//*using SQL PASS THROUGH TO ACCESS DATA SOURCE *//
LOCAL lnHandle
lnHandle = SQLConnect("My Remote text")
IF lnHandle > -1
SQLExec(lnHandle, "SELECT customers.* FROM customers","Results")
SELECT Results
BROWS
SQLDisconnect(lnHandle)
ENDIF
I try that sample, and also checking my ODBC connection just to be sure. Then the first error is this, NO CURSOR CREATED,... nothing happens, it did not shows the content of the customers file, then the second is..."INVALID CALL WHILE EXECUTING A SQLEXEC SEQUENCE".
Is there any other FREE source code using SQL PASS THROUGH that really works
thanks for any help

Using SQL Pass Through to Access my Remote Data Source
Rory Wilson
Thank you very much for the help, now i got it right! it works fine now.
Have a nice day and more power
Ernest D Cook
LOCAL lnHandle
lnHandle = SQLConnect("My Remote text")
* You can also try this:-
* lnHandle = sqlstringconnect("Your DNS-Less Connection String")
IF lnHandle > -1
SQLExec(lnHandle, "SELECT customers.* FROM customers","Results")
SELECT Results
BROWS
SQLDisconnect(lnHandle)
ELSE
= AERROR(aSQLErrorArray) && Data from most recent error
FOR n = 1 TO 7
aSQLErrorArray(1,n)
ENDFOR
IF ALEN(aSQLErrorArray,1) = 2 && ODBC error
"ODBC ERROR"
FOR n = 1 TO 7
aSQLErrorArray(2,n)
ENDFOR
ENDIF
ENDIF
Now you can see the error messages, hope this helps.
KathTam_MS
Try with:
SQLSETPROP(myHandle, 'asynchronous', .F.)
Perry G