Export (0) Print
Expand All

DatabaseFactory.CreateDatabase Method

Creates the default Database object

Namespace: Microsoft.Practices.EnterpriseLibrary.Data
Assembly: Microsoft.Practices.EnterpriseLibrary.Data (in Microsoft.Practices.EnterpriseLibrary.Data.dll) Version: 6.0.0.0 (6.0.1304.0)

public static Database CreateDatabase()

Return Value

Type: Database
The default database

Database dbSvc = DatabaseFactory.CreateDatabase();

ExceptionCondition
System.Configuration.ConfigurationErrorsExceptionThe configuration information cannot be read.
System.InvalidOperationExceptionThe database factory has not been intialized or some configuration information is missing.
Show:
© 2014 Microsoft