OleDbConnection.GetSchema OleDbConnection.GetSchema OleDbConnection.GetSchema OleDbConnection.GetSchema Method

定义

返回此 OleDbConnection 的数据源的架构信息。Returns schema information for the data source of this OleDbConnection.

重载

GetSchema() GetSchema() GetSchema() GetSchema()

返回此 OleDbConnection 的数据源的架构信息。Returns schema information for the data source of this OleDbConnection.

GetSchema(String) GetSchema(String) GetSchema(String) GetSchema(String)

通过使用架构名称的指定字符串,返回此 OleDbConnection 的数据源的架构信息。Returns schema information for the data source of this OleDbConnection using the specified string for the schema name.

GetSchema(String, String[]) GetSchema(String, String[]) GetSchema(String, String[]) GetSchema(String, String[])

通过使用指定字符串作为架构名称,指定字符串数组作为限制值,返回此 OleDbConnection 的数据源的架构信息。Returns schema information for the data source of this OleDbConnection using the specified string for the schema name and the specified string array for the restriction values.

GetSchema() GetSchema() GetSchema() GetSchema()

返回此 OleDbConnection 的数据源的架构信息。Returns schema information for the data source of this OleDbConnection.

public:
 override System::Data::DataTable ^ GetSchema();
public override System.Data.DataTable GetSchema ();
override this.GetSchema : unit -> System.Data.DataTable
Public Overrides Function GetSchema () As DataTable

返回

一个包含架构信息的 DataTableA DataTable that contains schema information.

另请参阅

GetSchema(String) GetSchema(String) GetSchema(String) GetSchema(String)

通过使用架构名称的指定字符串,返回此 OleDbConnection 的数据源的架构信息。Returns schema information for the data source of this OleDbConnection using the specified string for the schema name.

public:
 override System::Data::DataTable ^ GetSchema(System::String ^ collectionName);
public override System.Data.DataTable GetSchema (string collectionName);
override this.GetSchema : string -> System.Data.DataTable
Public Overrides Function GetSchema (collectionName As String) As DataTable

参数

collectionName
String String String String

指定要返回的架构的名称。Specifies the name of the schema to return.

返回

一个包含架构信息的 DataTableA DataTable that contains schema information.

注解

collectionName指定为 null 时DataTable ,将包含有关所有可用元数据及其限制的信息。When collectionName is specified as null, the DataTable will contain information about all the metadata that is available, and its restrictions.

另请参阅

GetSchema(String, String[]) GetSchema(String, String[]) GetSchema(String, String[]) GetSchema(String, String[])

通过使用指定字符串作为架构名称,指定字符串数组作为限制值,返回此 OleDbConnection 的数据源的架构信息。Returns schema information for the data source of this OleDbConnection using the specified string for the schema name and the specified string array for the restriction values.

public:
 override System::Data::DataTable ^ GetSchema(System::String ^ collectionName, cli::array <System::String ^> ^ restrictionValues);
public override System.Data.DataTable GetSchema (string collectionName, string[] restrictionValues);
override this.GetSchema : string * string[] -> System.Data.DataTable
Public Overrides Function GetSchema (collectionName As String, restrictionValues As String()) As DataTable

参数

collectionName
String String String String

指定要返回的架构的名称。Specifies the name of the schema to return.

restrictionValues
String[]

为请求的架构指定一组限制值。Specifies a set of restriction values for the requested schema.

返回

一个包含架构信息的 DataTableA DataTable that contains schema information.

注解

collectionName指定为 null 时DataTable ,将包含有关所有可用元数据及其限制的信息。When collectionName is specified as null, the DataTable will contain information about all the metadata that is available, and its restrictions.

参数可以提供 n 个值的深度,这些值由特定集合的限制集合指定。 restrictionValuesThe restrictionValues parameter can supply n depth of values which are specified by the restrictions collection for a specific collection. 若要设置给定限制的值,而不设置其他限制的值,则需要将前面的限制设置为 null,然后将相应的值放在中,以确定要为其指定值的限制。In order to set values on a given restriction, and not set the values of other restrictions, you need to set the preceding restrictions to null and then put the appropriate value in for the restriction that you would like to specify a value for.

"Tables" 集合就是这样的一个示例。An example of this is the "Tables" collection. 如果 "Tables" 集合具有三个限制(数据库、所有者和表名称),并且您想要只返回与 "Carl" 所有者关联的表,则必须至少传入以下值: null、"Carl"。If the "Tables" collection has three restrictions (database, owner, and table name), and you want to get back only the tables associated with the owner "Carl," you must pass in the following values (at a minimum): null, "Carl". 如果未传入限制值,则将默认值用于该限制。If a restriction value is not passed in, the default values are used for that restriction. 这与传入 null 的映射相同,后者不同于传入参数值的空字符串。This is the same mapping as passing in null, which is different from passing in an empty string for the parameter value. 在这种情况下,空字符串("")被视为指定参数的值。In that case, the empty string ("") is considered to be the value for the specified parameter.

另请参阅

适用于