Board index » delphi » Obtaining Schema Information via the BDE

Obtaining Schema Information via the BDE

We're looking into how we can obtain schema information from various
platforms (all of the SQL Links drivers amongst others). Unforuntately
initial investigations into using ADOX have proven to be no use as the
Oracle OLE-DB Driver does not return back correct schema information. So
we're looking into perhaps using the BDE API to get this instead.

When using SQL Explorer, if you view the text of a selected table, it
displays the correct CREATE TABLE DDL statement required to recreate the

On platforms such as Oracle, the CREATE TABLE statement is suffixed with all
of the extra information that Oracle permits on a CREATE TABLE statement

How does it get this extra information??? Upon running SQL Explorer through
SQL Monitor, it only performs two SELECTS on the system tables (to return
back column information). All other information is acquired from somewhere
else. The question is how (and where)???

I'm assuming the dbiOpenList and dbiGetDescs function perhaps come into
it???? Could someone point me in the right direction as to where I can found
how this this entire create table statement is produced.

Thanks in advance.

Simon Whelband


Re:Obtaining Schema Information via the BDE

I don't know about the BDE, but in the case or Oracle, this information
can be retrieved from the static dictionary views via SQL.  SELECT *
FROM USER_TABLES (or dba_tables) WHERE TABLE_NAME = 'TNAME', for example
will give you detailed info about the table.  There are tons of these
views and any Oracle DBA handbook will tell you what they are.


Other Threads