Database connection parameters by the
DbOpen method in the form of
ADO ConnectionString text string. The
ADO ConnectionString (
http://www.connectionstrings.com) contains all necessary parameters needed by the
ADO Connection object for database connection via the selected
ADO Provider. The typical parameters are represented for example by connection provider (
provider), server address (
server), database name (
database), login name and password (
uid,
pwd), etc. The parameter list and exact syntax is defined by the corresponding
ADO Provider, parameters may differ by individual
ADO Providers. However for the sake of compatibility most providers
ADO Provider understand multiple names of the main parameters simultaneously (e.g. the database name can be represented by
database,
data source,
dbq, etc.).
Caution: The syntax of this string is different than other strings used in the PROMOTIC system, the value and the name are separated by
=, not by "colon" (
:). Entries with assigned value are separated by a semicolon, for example
"provider=SQLOLEDB;server=.\SQLEXPRESS;database=pm_data;uid=pm_admin;pwd=pmadmin;".
The defined parameters may not always be valid (for most common cases), it depends on the selected
ADO Provider.
"provider:xxx;" (optional) - Specifies which
ADO Provider will be used for database connection. It can be the
ADO Provider by the
Microsoft company, or another
ADO Provider can be used, e.g.
"provider=MSDASQL;"
MSDASQL (default) - Microsoft provider for ODBC.
SQLOLEDB - Microsoft provider for MS SQL Server.
Microsoft.Jet.OLEDB.4.0 - Microsoft provider for Access (*.MDB).
"server=xxx;" (optional) - SQL server name, that holds the database to connect to. Depends on the SQL server type. The name usually consists of the computer name (IP address) and server instance name, separated by separator character, for example "server=.\SQLEXPRESS;".
"database=xxx;" (optional) - Database name, e.g. "database=pm_data;".
"dsn=xxx;" (optional) - Name of registered ODBC DSN source. In this case, there is no need to enter the server, database or driver, because all thise information is defined in the registered DSN source, for example dsn=pm_data;.
"driver=xxx;" (optional) - Name of ODBC driver, e.g. driver={Microsoft dBASE Driver (*.dbf)};.
"uid=xxx;" (optional) - User name to be used for database connection, e.g. uid=pm_admin;.
"pwd=xxx;" (optional) - User password, e.g. pwd=pmadmin;.