You can't use native VFP commands when you access other DB via ODBC.
If you send this to SQL Server par example you said it to try to Open DataBase named TableXXX :-)
So, as Beth said use SELECT instead:
IF SQLEXEC(nHandle,[SELECT * from TableXXX],[MyOtherCursor]) < 0
AERROR(laError)
MessageBox(laError[1,2])
ENDIF
>Hi all!
>I'm trying to connect a DBISAM database via ODBC. Connection runs well I gess, I can list tales in database, but how can I read/browse a table?
>Any help will be great.
>Thank's in advance,
>NPedro
>
>
>
>****** SAMPLE CODE *******
>nHandle = Sqlstringconnect("Driver={DBISAM 4 ODBC Driver};ConnectionType=Local; CatalogName=c:\datapath\data;TablePassword=323533")
>
>*!* nHandle : returns positive number: OK
>
>nTables = SQLTables(nHandle, 'TABLE', 'mycursor' )
>Select mycursor
>Browse
>
>*!* browses tables names... inside database: OK
>
>nResult = SQLExec(nHandle, 'use tablexxx')
>
>*!* returns negative number: ERROR!!!
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.