Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using ADO
Message
From
09/07/2000 21:53:28
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
 
To
09/07/2000 09:28:24
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00389950
Message ID:
00390082
Views:
18
Kobi,

I haven't worked with ADO at all, but the SQL to get a list of tables from the database is:

nConnectionHandle = SQLCONN("MyNamedConnection")
nWhatAreTheTables = SQLTABLES(nConnectionHandle)
nWhatAreTheColumns = SQLCOLUMNS(nConnectionHandle, "cMyTableName")

SQLTABLES returns the result in a CURSOR named SQLResult with columns Table_qualifier, Table_owner, Table_name, Table_type, Remarks.
In the database I use, Table_name and Table_type had values and the other fields were null. Values for Table_type were "TABLE" and "VIEW."

SQLColumns returns a cursor also called SQLResult. I think you can spacify the name of the returned cursor as one of the arguments. Columns returned are Field_name, Field_type, Field_len, Field_dec (decimal points?)




>I'd like to connect to any SQL database (ORACLE,SQL) using ADO
>
>But I just want to get the list of tables in the DataBase
>
>How do we do it ?
>
>Thanks for help .
Previous
Reply
Map
View

Click here to load this message in the networking platform