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 .
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement