Getting schema information of SQL Server

K

KishorK

OleDbConnection class has GetOleDbSchemaTable method which gives schema
information of database.

There is no such method (GetSqlDbSchemaTable) for SqlConnection class.

How shall one go for getting schema information for SqlServer database?

(basically I want schema information of each field, pk, fk, stored
procedures.)

How shall i go about this?

thx.
 
W

William Ryan

There are a few ways to do it. One is to use
GetSchemaTable. Another is to query SQLServer and
Sysobjects for instance looking for xtype of PK, k, P, U
etc. You can do the same for Server information if your
login can access master.

Here is a good link on the subject.

Good Luck,

Bill
 

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