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.

restrictionValues可以提供參數n深度的特定集合的限制集合所指定的值。The 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.

另請參閱

適用於