ODBC Connection Strings
This section describes the ODBC connection strings supported by PSQL. This information is provided for advanced users using a database access tool that allows connection strings to be specified and for developers writing ODBC or OLE DB applications to access PSQL.
ODBC Driver Parameter
You must specify the PSQL ODBC driver to use to connect to the PSQL database engine. See PSQL ODBC Driver Names for a description of the available drivers.
Use the ODBC Driver parameter to specify the appropriate driver. For example:
Driver={Pervasive ODBC Unicode Interface}
Driver={Pervasive ODBC Interface}
Driver={Pervasive ODBC Client Interface}
Driver={Pervasive ODBC Engine Interface}
Driver Parameters
The specific driver specified by the Driver parameter has additional attribute parameters for naming the server, port, database, etc. In addition to these common parameters, each driver has parameters specific to it. The tables below show, for the different drivers, the driver parameters that may be used. The attributes can be included with the ODBC function SQLDriverConnect or with SQLConnect.
ServerName=server[.port]
Specify the machine name or IP address of the computer to which you wish to connect. Required. Port is provided from backwards compatibility and allows you to specify the port number to use if you are not using the default port. When using IPv6 addresses and appending a port number in ODBC connections, use an IPv6-literal.net name or UNC-safe name. See Drive-based Formats in Getting Started With PSQL.
DBQ=[@]db_name
PvTranslate defaults to “auto” for the Unicode driver. This allows you to use NCHAR columns and NCHAR literals with wide character data without having to explicitly set PvTranslate to “auto.”
UID=user_name
PWD=password
Connect to a database named “SOMEDATA” that contains wide character data on a remote server named “ServerMain” using TCP/IP port 1590, trying TCP/IP first then SPX:
Driver={Pervasive ODBC Unicode Interface}; ServerName=ServerMain.1590;DBQ=SOMEDATA; TransportHint=TCP:SPX;
Connect to a database named “EuropeRegion4” that contains wide character data on a local server named with database security turned on:
Driver={Pervasive ODBC Unicode Interface}; DBQ=EuropeRegion4;UID=tonyawu7;PWD=HR19lb8w;
 
ServerName=server[.port]
Specify the machine name or IP address of the computer to which you wish to connect. Required. Port is provided from backwards compatibility and allows you to specify the port number to use if you are not using the default port. When using IPv6 addresses and appending a port number in ODBC connections, use an IPv6-literal.net name or UNC-safe name. See Drive-based Formats in Getting Started With PSQL.
DBQ=[@]db_name
UID=user_name
PWD=password
Example
Connect to a local named database “acctdomestic” with a 64-bit application:
Driver={Pervasive ODBC Interface};DBQ=acctdomestic;
ServerName=server[.port]
Specify the machine name or IP address of the computer to which you wish to connect. Required. Port is provided from backwards compatibility and allows you to specify the port number to use if you are not using the default port. When using IPv6 addresses and appending a port number in ODBC connections, use an IPv6-literal.net name or UNC-safe name. See Drive-based Formats in Getting Started With PSQL.
ServerDSN=dsn_name
DBQ=[@]db_name
UID=user_name
PWD=password
Connect to a database named “Atlantis” on a remote server named “AncientLore” using TCP/IP port 1585:
Driver={Pervasive ODBC Client Interface}; ServerName=AncientLore.1585;DBQ=Atlantis;
Connect to a database named “DomSales” on a remote server named “SalesSvr” with database security turned on:
Driver={Pervasive ODBC Client Interface}; ServerName=SalesSvr;DBQ=DomSales;UID=alexjame;PWD=k7Jb9xRR;
Connect to an Engine DSN named “mydata” on a remote server named “MyServer” and establish automatic encoding support:
Driver={Pervasive ODBC Client Interface}; ServerName=MyServer;ServerDSN=mydata;PvTranslate=auto;
DBQ=[@]db_name
UID=user_name
PWD=password
TRANSLATIONDLL=path_and_DLL_name
Connect to a local database named “DATA5”:
Driver={Pervasive ODBC Engine Interface};DBQ=DATA5;
*Note: Engine DSNs are deprecated. New or updated applications should use Client DSNs in local or remote connection mode.