Dbms connection string format, Odbc connection string format – Pitney Bowes MapXtreme User Manual

Page 222

Advertising
background image

Chapter 11: Accessing Data from a DBMS

DBMS Connection String Format

MapXtreme v7.1

229

Developer Guide

DBMS Connection String Format

ODBC Connection String Format

The format of the ODBC connection string is defined by several clauses separated by semicolons
(;). Each clause has the form Key=Value. Important keys are listed below.

L

Connection attributes/parameters do not have to be in order and one may use a dialog to get
a connection from an existing connection pool to avoid redundant connections. In previous
version of our API, if you used a dialog each time to connect to the same database, or if you
did not order the connection keywords in the connection string in the documented order, the
connection would not be shared and you would get multiple connections.

Keyword

Description

DLG=

A number that controls the display of the connection dialog box:
0 – Suppresses the connection dialog.
1 – Displays the connection dialog.
2 – Displays the connection dialog, but only if needed (i.e., if not all required
information was provided) [default].

L

ASP.NET Applications which use Pooling must have a DLG=0 clause in the
connection string for ODBC.

DSN=

Specifies the ODBC data source name.

Caution: If you use the DSN= syntax key, the name that you specify must match the
data source name in use on the user’s system. Note that different users might use
different names to refer to the same data source. If you cannot know in advance
what data source name to use, use the DRIVER= syntax key instead of the DSN=
syntax key.

DRIVER=

Specifies the exact driver name of the installed driver. Used instead of the DSN=
syntax key.

Example:

DRIVER={SQL Server}

L

This does not apply to Oracle Spatial.

UID=

Specifies the desired UserId for the data source, if required.

PWD=

Specifies the user’s password for the data source, if required. Passwords do not
need to be in the connection string for the two strings to match. If two tables are in
the same database, the connection string is the same.

Advertising