ADO.NET 2.0 Metadata: How to get constraints information for a table?

  • Thread starter Thread starter sudha
  • Start date Start date
S

sudha

Hi,

ADO.NET 2.0 Metadata APIs have a method called GetSchema() to get
metadata information. Using it, I have been able to get columns
information for a table. However, I cannot figure out how to get table
relations information. I tried using GetSchema("constraints") but that
does not work.

Can someone please tell me what is the right way to get this
information?

Thank you in advance for your help.

Sudha
 
Try GetSchema("ForeignKeys") to get foreign key relationships, and "Indexes"
and "IndexColumns" to get primary key information.

You'll have to manually construct the relationships from the above returned
data.

Robert
 
Back
Top