Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fix font and typo

To change which database is being targeted, the web.config file must be edited, and at a minimum there are 3 options which must be changed to support each database engine - as per the table below:

 

Database ProductMigrator ProviderNHibernate DriverNHibernate Dialect

MySQL

Migrator.Providers.Mysql.MsqlDialectMysqlDialect

NHibernate.Driver.MySqlDataDriver

EnterpriseTester.Core.Dialects.MySqlDialectEx, EnterpriseTester.Core

Oracle 10g/11g

Migrator.Providers.Oracle.OracleDialect

NHibernate.Driver.OracleDataClientDriver

NHibernate.Dialect.Oracle10gDialect

PostgreSQL

Migrator.Providers.PostgreSQL.PostgreSQL82Dialect

NHibernate.Driver.NpgsqlDriver

NHibernate.Dialect.PostgreSQL82Dialect

SQLServer 2005 (and above)Migrator.Providers.SqlServer.SqlServer2005DialectNHibernate.Driver.SqlClientDriver

EnterpriseTester.Core.Dialects.MsSql2005DialectEx, EnterpriseTester.Core

SQLServer Express 2005 (and above)

Migrator.Providers.SqlServer.SqlServer2005Dialect

NHibernate.Driver.SqlClientDriver

EnterpriseTester.Core.Dialects.MsSql2005DialectEx, EnterpriseTester.Core

Example Connection Strings

Each database also uses a slightly different connection string format - the http://connectionstrings.com/ website provides  website provides useful details of each connection string format.

Database ProductExample Connection String

Oracle

UserID=SYSTEM;Password=password;Data Source=192.168.1.232:1521/orcl

PostgreSQL

(info)

192.168.1.232;Port=5432;Database=etest;UserId=postgres;Password=Password123;Timeout=60;CommandTimeout=120;

SQL Server Express (user-attached database)

DataSource=.\SQLExpress;AttachDbFilename=C:\ProgramFiles(x86)\CatchLimited\EnterpriseTests\Data\EnterpriseTester.mdf;InitialCatalog=EnterpriseTester;Trusted_Connection=Yes;

SQL Server (Integrated Security)

DataSource=.\SQLExpress;Initial Catalog=EnterpriseTester;IntegratedSecurity=True;

SQL Server (SQL username/password)

DataSource=dbserver;Initial Catalog=EnterpriseTester;UserId=etuser;Password=etpass;

Info

Configuring application to use a PostgreSQL database.

...