Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening database via ODBC
Message
 
To
28/03/2006 12:03:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01108409
Message ID:
01108450
Views:
10
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform