DbProviderServices.DbDatabaseExists 方法

定義

傳回值,這個值表示指定的資料庫是否存在於伺服器,以及是否已建立 storeItemCollection 所含的結構描述物件。

protected:
 virtual bool DbDatabaseExists(System::Data::Common::DbConnection ^ connection, Nullable<int> commandTimeout, System::Data::Metadata::Edm::StoreItemCollection ^ storeItemCollection);
protected virtual bool DbDatabaseExists (System.Data.Common.DbConnection connection, int? commandTimeout, System.Data.Metadata.Edm.StoreItemCollection storeItemCollection);
abstract member DbDatabaseExists : System.Data.Common.DbConnection * Nullable<int> * System.Data.Metadata.Edm.StoreItemCollection -> bool
override this.DbDatabaseExists : System.Data.Common.DbConnection * Nullable<int> * System.Data.Metadata.Edm.StoreItemCollection -> bool
Protected Overridable Function DbDatabaseExists (connection As DbConnection, commandTimeout As Nullable(Of Integer), storeItemCollection As StoreItemCollection) As Boolean

參數

connection
DbConnection

與資料庫的連接,這個方法會驗證此資料庫是否存在。

commandTimeout
Nullable<Int32>

判斷資料庫存在與否所需之任何命令的執行逾時時間。

storeItemCollection
StoreItemCollection

資料庫的結構,這個方法會判斷這個結構是否存在。

傳回

如果這個連接和 storeItemCollection 參數所表示的資料庫存在,則為 true,否則為 false

適用於