Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the OleDb equivalent for INFORMATION_SCHEMA

Tags:

.net

sql

oledb

In SQL you can use

SELECT * FROM INFORMATION_SCHEMA.TABLES

etc to get information about the database structure. I need to know how to achieve the same thing for an Access database.

like image 908
Michael Prewecki Avatar asked Sep 22 '08 22:09

Michael Prewecki


People also ask

Is the specified schema rowset supported by the OLE DB provider?

A DataTable that contains the requested schema information. The specified set of restrictions is invalid. The OleDbConnection is closed. The specified schema rowset is not supported by the OLE DB provider. The schema parameter contains a value of DbInfoLiterals and the restrictions parameter contains one or more restrictions.

How do I return a schema table from OLE DB?

The schema table is returned as a DataTable that has the same format as the OLE DB schema rowset specified by the schema parameter. Use the restrictions parameter to filter the rows to be returned in the DataTable (for example, by specifying restrictions for table name, type, owner, or schema).

What is an oledbschemaguid?

One of the OleDbSchemaGuid values that specifies the schema table to return. An Object array of restriction values. These are applied in the order of the restriction columns. That is, the first restriction value applies to the first restriction column, the second restriction value applies to the second restriction column, and so on.

What databases support information_schema views?

What databases support INFORMATION_SCHEMA views Database Information schema Alternative catalog SQL Server Yes System Catalog Views (sys schema) Azure SQL Database Yes System Catalog Views (sys schema) Oracle database No Data Dictionary Views / Catalog Views MySQL Yes No 14 more rows ...


1 Answers

The equivalent operation can be accomplished using

OleDbConnection.GetOleDbSchemaTable() method.

see http://support.microsoft.com/kb/309488 for more information

like image 104
Michael Prewecki Avatar answered Oct 13 '22 01:10

Michael Prewecki