Getting schema information of SQL Server

  • Thread starter Thread starter KishorK
  • Start date Start date
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.
 
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
 
Back
Top