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

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
 
R

Robert Simpson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top