Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle relations via ODBC / ORA OLE DB Provider
Jochen Rieseberg wrote:
> Hello all!
>
> i have to read out from MS Access / Visual Basic all tables, fields and
> relations of a big Oracle database using ADOX and the Oracle OLE DB
> Provider. No problem with tables and fields so far, but i do not know how to
> get the relations / foreign table / foreignkey. Can anybody help me??
>
> Jochen Rieseberg
> www.rieseberg.de
SELECT t.owner CHILD_OWNER,
t.table_name CHILD_TABLE, t.constraint_name FOREIGN_KEY_NAME, r.owner PARENT_OWNER, r.table_name PARENT_TABLE, r.constraint_name PARENT_CONSTRAINT
AND t.r_owner = r.owner AND t.constraint_type='R' AND t.table_name = <child_table_name>;
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Tue Feb 03 2004 - 09:41:45 CST