DbProviderServices.DatabaseExists Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a value indicating whether a given database exists on the server and whether schema objects contained in the storeItemCollection have been created.
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
Parameters
- connection
- DbConnection
Connection to a database whose existence is verified by this method.
Execution timeout for any commands needed to determine the existence of the database.
- storeItemCollection
- StoreItemCollection
The collection of all store items contained in the database whose existence is determined by this method.
Returns
true
if the provider can deduce the database only based on the connection.