How to get meta data info in ADO.NET

G

Guest

Hi,

We are developing a Windows Form application that try to retrieve the
Database Schema from MS SQL Server and Oracle. The application is developing
under Visual Studio .NET 2005 with the use of Schema API from ADO.NET 2.0.
With the use GetSchema() method of SQLConnection and OracleConnection, we
can successfully retrieve all the tables and columns from the database. But
we
got the following difficulities during the retrieve of database schema:

1. How can i identify which columns are primary key or foreign key?

2. Can we retrieve the reference of foreign key (e.g, which column of which
table are bing referenced by a foreign key)?

2. Can we retrieve the relations between tables?

3. Is it necessary to install Oracle Client for the use of OracleConnection
within ADO.NET 2.0?

We are looking forward to your favorable reply.

Best Regards
 
W

William \(Bill\) Vaughn

Did you try Connection.GetSchema?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 

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