Reading META data using .NET's OleDbConnection

Reading META data using .NET's OleDbConnection

Post by Mik » Sat, 13 Sep 2003 21:06:10



We're using the .NET OleDb classes to read meta data out of SQL
Server, SQL has all of the proper SQL 92 Information Schema Views
however the API in .NET doesn't return View information, it does for
Tables and Stored procs?

====================================== ==============
OleDbConnection cn = new OleDbConnection("my connection");
cn.Open();
DataTable schemaTable=cn.GetOleDbSchemaTable(OleDbSchemaGuid.Views,
null);
====================================

I get the error: The Views OleDbSchemaGuid is not a supported schema
by the 'SQLOLEDB' provider.

Oracle supports it fully, SQL Server has all of the views I wonder why
they didn't support this?

 
 
 

Reading META data using .NET's OleDbConnection

Post by Vinod » Sun, 14 Sep 2003 13:42:28


SQL Server does have the Information Schema tables in place for the metadata
... But I think you can ask the .NET Forums on this behaviour...

--
HTH,
Vinod Kumar
MCSE, DBA, MCAD
http://www.extremeexperts.com


Quote:> We're using the .NET OleDb classes to read meta data out of SQL
> Server, SQL has all of the proper SQL 92 Information Schema Views
> however the API in .NET doesn't return View information, it does for
> Tables and Stored procs?

> ====================================== ==============
> OleDbConnection cn = new OleDbConnection("my connection");
> cn.Open();
> DataTable schemaTable=cn.GetOleDbSchemaTable(OleDbSchemaGuid.Views,
> null);
> ====================================

> I get the error: The Views OleDbSchemaGuid is not a supported schema
> by the 'SQLOLEDB' provider.

> Oracle supports it fully, SQL Server has all of the views I wonder why
> they didn't support this?