Share via


DatabaseFactory.CreateDatabase Method

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Method for invoking a default Database object. Reads default settings from the ConnectionSettings.config file.

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

Syntax

'Declaration
PublicSharedFunctionCreateDatabaseAs Database
publicstatic Database CreateDatabase()
public:
static Database^ CreateDatabase()
publicstaticfunctionCreateDatabase() : Database

Return Value

Database

Examples

            Database dbSvc = DatabaseFactory.CreateDatabase();
            

Exceptions

Exception Condition
System.Configuration.ConfigurationException

An error occured while reading the configuration.

See Also

DatabaseFactory Class

CreateDatabase Overload

Microsoft.Practices.EnterpriseLibrary.Data Namespace

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.