EntityDAC

ConnectionString

Data Provider and SQL Dialect

DataProviders are components that the ORM uses to connect to a particular database, for example: UniDAC Data Provider for any database, ODAC Data Provider - for Oracle database, etc.

SQLDialect defines the used database name (e.g., SQLite, Oracle, SQL Server, etc.) to use the syntax and features of each particular database.

By default, an SQLite database and the TLiteDACDataProvider are used in the demo. You can use the following data providers in the EntityDemo:

ConnectionString

To connect to your database, you should set the ConnectionString property for any used provider. It must include the used data provider name, SQL dialect*, and the database connection parameters string (depends on the used data provider). In addition, the Login Prompt parameter (True by default) can be specified.

For those providers, that don't support working with various databases, SQL Dialect will be set automatically.

TUniDACDataProvider

For TUniDACDataProvider set Data Provider=UniDAC and the other ConnectionString parameters for UniDAC devided by semicolon.

Sample:

EntityConnection1.ConnectionString := 'Data Provider=UniDAC;SQL Dialect=SQLite;Login Prompt=False;Database=c:\test.db3';

Available SQL Dialect: InterBase/Firebird, SQLite, MySQL, Oracle, PostgreSQL, SQL Server.

UniDAC Connection String: Connection String is similar to the one used in UniDAC

More details about ConnectionString for UniDAC can be found at http://www.devart.com/UniDAC/docs/devart.dac.tcustomdaconnection.connectstring.htm

TODACDataProvider

For TODACDataProvider set Data Provider=ODAC and the other ConnectionString parameters for ODAC devided by semicolon. SQL Dialect can be not specified.

Sample:

EntityConnection1.ConnectionString := 'Data Provider=ODAC;SQL Dialect=Oracle;Login Prompt=False;Data Source=ORCL;User ID=scott;Password=tiger';

ODAC Connection String: Connection String is similar to the one used in ODAC

More details about ConnectionString for ODAC can be found at http://www.devart.com/ODAC/docs/devart.dac.tcustomdaconnection.connectstring.htm

TSDACDataProvider

For TSDACDataProvider set Data Provider=SDAC and the other ConnectionString parameters for SDAC devided by semicolon. SQL Dialect can be not specified.

Sample:

EntityConnection1.ConnectionString := 'Data Provider=SDAC;SQL Dialect=SQL Server;Login Prompt=False;Data Source=DBMSSQL;Initial Catalog=master;User ID=sa';

SDAC Connection String: Connection String is similar to the one used in SDAC

More details about ConnectionString for SDAC can be found at http://www.devart.com/SDAC/docs/devart.dac.tcustomdaconnection.connectstring.htm

TMyDACDataProvider

For TMyDACDataProvider set Data Provider=MyDAC and the other ConnectionString parameters for MyDAC devided by semicolon. SQL Dialect can be not specified.

Sample:

EntityConnection1.ConnectionString := 'Data Provider=MyDAC;SQL Dialect=MySQL;Login Prompt=False;User ID=root;Password=root;Data Source=localhost;Database=test';

MyDAC Connection String: Connection String is similar to the one used in MyDAC

More details about ConnectionString for MyDAC can be found at http://www.devart.com/MyDAC/docs/devart.dac.tcustomdaconnection.connectstring.htm

TIBDACDataProvider

For TIBDACDataProvider set Data Provider=IBDAC and the other ConnectionString parameters for IBDAC devided by semicolon. SQL Dialect can be not specified.

Sample:

EntityConnection1.ConnectionString := 'Data Provider=IBDAC;SQL dialect=InterBase;Data Source=127.0.0.1;User ID=sysdba;Password=masterkey;Client Library=fbclient.dll;Database=c:\fbd.fdb';

More details about ConnectionString for IBDAC can be found at http://www.devart.com/ibdac/docs/devart.dac.tcustomdaconnection.connectstring.htm

TPgDACDataProvider

For TPgDACDataProvider set Data Provider=PgDAC and the other ConnectionString parameters for PgDAC devided by semicolon. SQL Dialect can be not specified.

Sample:

EntityConnection1.ConnectionString := 'Data Provider=PgDAC;SQL Dialect=PostgreSQL;Login Prompt=False;Data Source=localhost;User ID=postgres;Password=postgres;Database=postgres;Schema=public';

PgDAC Connection String: Connection String is similar to the one used in PgDAC

More details about ConnectionString for PgDAC can be found at http://www.devart.com/PgDAC/docs/devart.dac.tcustomdaconnection.connectstring.htm

TLiteDACDataProvider

For TLiteDACDataProvider set Data Provider=LiteDAC and the other ConnectionString parameters for LiteDAC devided by semicolon. SQL Dialect can be not specified.

Sample:

EntityConnection1.ConnectionString := 'Data Provider=LiteDAC;SQL Dialect=SQLite;Login Prompt=False;Database=c:\test.db3';

LiteDAC Connection String: Connection String is similar to the one used in LiteDAC

More details about ConnectionString for LiteDAC can be found at http://www.devart.com/litedac/docs/devart.dac.tcustomdaconnection.connectstring.htm

TADODataProvider

For TADODataProvider set Data Provider=ADO and the other ConnectionString parameters for ADO devided by semicolon.

Sample:

EntityConnection1.ConnectionString := 'Data Provider=ADO;SQL Dialect=XXX;Login Prompt=False;ADO Connection String';

Available SQL Dialect: InterBase/Firebird, SQLite, MySQL, Oracle, PostgreSQL, SQL Server.

ADO Connection String: Connection String is similar to the one used in ADO

TDBXDataProvider

For TDBXDataProvider set Data Provider=dbExpress and the other ConnectionString parameters for dbExpress devided by semicolon.

The Connection Driver/ConnectionDriver parameter points to the registered connection in Data Explorer and sets it in the TSQLConnection.ConnectionName property.

The DriverName, VendorLib, LibraryName, GetDriverFunc parameters also correspond to analogue class properties of the TSQLConnectionin class.

Also, parameters supported in TSQLConnection.Params can be used as parameters here.

Sample:

EntityConnection1.ConnectionString := 'Data Provider=dbExpress;SQL Dialect=XXX;Login Prompt=False;Connection Driver=Devart Oracle;user_name=User;password=passwd';

Available SQL Dialect: InterBase/Firebird, SQLite, MySQL, Oracle, PostgreSQL, SQL Server.

TIBXDataProvider

For TIBXDataProvider set Data Provider=IBX and the other ConnectionString parameters for IBX devided by semicolon. SQL Dialect can be not specified.

The DatabaseName/Database Name/Database parameter sets the TIBDatabase.DatabaseName; property value.

Also, parameters supported in TIBDatabase.Params can be used as parameters here.

Sample:

EntityConnection1.ConnectionString := 'Data Provider=IBX;SQL Dialect=InterBase/Firebird;Login Prompt=False;DatabaseName=TEST;user_name=User;password=passwd';

TFireDACDataProvider

For TFireDACDataProvider set Data Provider=FireDAC and the other ConnectionString parameters for FireDAC devided by semicolon.

Sample:

EntityConnection1.ConnectionString := 'Data Provider=FireDAC;SQL Dialect=XXX;Login Prompt=False;FireDAC Connection String';

Available SQL Dialect: InterBase/Firebird, SQLite, MySQL, Oracle, PostgreSQL, SQL Server.

FireDAC Connection String: Connection String is similar to the one used in FireDAC

ConnectionDefName parameter is added. It defines the connection name added in the ConnectionDef list.

© 1997-2017 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback