DbProviderServices.DatabaseExists 方法

定義

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

public:
 bool DatabaseExists(System::Data::Common::DbConnection ^ connection, Nullable<int> commandTimeout, System::Data::Metadata::Edm::StoreItemCollection ^ storeItemCollection);
public bool DatabaseExists (System.Data.Common.DbConnection connection, int? commandTimeout, System.Data.Metadata.Edm.StoreItemCollection storeItemCollection);
member this.DatabaseExists : System.Data.Common.DbConnection * Nullable<int> * System.Data.Metadata.Edm.StoreItemCollection -> bool
Public Function DatabaseExists (connection As DbConnection, commandTimeout As Nullable(Of Integer), storeItemCollection As StoreItemCollection) As Boolean

參數

connection
DbConnection

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

commandTimeout
Nullable<Int32>

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

storeItemCollection
StoreItemCollection

資料庫中所有存放區項目的集合,這個方法會判斷這些存放區項目是否存在。

傳回

如果提供者只能根據連線推算資料庫,則為 true

適用於