-2

I want to collect all the Design Information from an Database. It was possible for me to gather the most information, but I cant get Information about Foreign Keys! Is there an possibility to get the Foreign keys from an Oracle DB with an ODBC Connection?!?!?

for example MSSql gives the possibility in C# with:

SqlCommand myCommand = new SqlCommand("sp_fkeys", myConnection);

Is there existing an alternative for ODBC in C#?

fecub
  • 945
  • 10
  • 27

1 Answers1

1

ODBC has functions that allow database-independent querying of metadata. Start with this page in the ODBC Programmer's Reference and look at the section labeled "Obtaining information about the data source's system tables (catalog functions)". In particular, you're probably interested in the SQLForeignKeys function.

Share and enjoy.