Try OpenEdge Now
skip to main content
DataServer for Microsoft SQL Server
Connecting the DataServer : Connecting a schema holder : Special connection issues

Special connection issues

The DataServer (-Dsrv) parameter uses the PRGRS_CONNECT option to allow you to pass ODBC-specific information to the ODBC driver. A DataServer connection string contains all of the information needed to establish a connection. It consists of a series of keywords/value pairs separated by semicolons. The DataServer for MS SQL Server passes the connection string specified by the PRGRS_CONNECT option directly through to the ODBC driver without modification. For more information and a complete list of keywords, refer to the Microsoft ODBC programming reference documentation. The parameter has the following syntax:


-Dsrv PRGRS_CONNECT,connection-string;
ODBC-specific connection information is passed in connection-string. The connection string is separated from the option by a comma (,) and ends with a semicolon (;). There can be no spaces within connection-string. If any of the name/value pairs does include a space, substitute the value &^ for the space.
Value pairs within the connect string are delimited by a semicolon (;).
Note: PRGRS_CO is a valid abbreviation for PRGRS_CONNECT.
Use the PRGRS_CONNECT parameter in the following cases:
*To establish complex connections that require more than the Physical Database Name (-db), User ID (-U), and Password (-P) parameters, as follows:
CONNECT datasrc-name -ld logical-datasrc-name -dt MSS
-Dsrv PRGRS_CO,DSN=datasrc-name;server=servername;UID=name;PWD=password;.
For datasrc-name, supply the name of the MS SQL Server database. Server is a driver-specific keyword. The -Dsrv connection string is passed directly to the data source. The DataServer does not modify this value.
*To connect to a MS SQL Server database whose name has a blank space, which is not allowed by OpenEdge, substitute the characters &^ for the illegal characters in the data source name. OpenEdge ignores datasrc-name when you use PRGRS_CONNECT; however, you must supply it to pass syntax validation. Supply the name as part of the connection string for PRGRS_CONNECT, as follows:
CONNECT datasrc-name -ld logical-database-name -dt MSS
-Dsrv PRGRS_CO,data-&^source&^name;.
*To connect to the MS SQL Server database using the ODBC driver as a guide, specify an empty PRGRS_CONNECT, which tells the ODBC driver to handle the entire connection process interactively. For example:
CONNECT datasrc-name -ld logical-name -dt MSS
-Dsrv PRGRS_CO,;.
To simplify your PRGRS_CONNECT string, you can specify a File DSN. When you configure access to your MS SQL Server database, specify a File DSN and then reference that file in your connect string. For example:
CONNECT datasrc-name -ld logical-name -dt MSS
-Dsrv PRGRS_CO,FILEDSN=dsn-filename;.