Connection string examples
- Last Updated: February 6, 2025
- 2 minute read
- DataDirect Connectors
- ODBC
- Documentation
ODBC provides a method for specifying connection information via a connection string and the SQLDriverConnect API. This section provides examples of connection strings configured to use common features and functionality. You can modify and/or combine these examples to create a connection string for your environment.
In addition to the connection strings for DSN-less connections demonstrated in this section, the driver supports DSN and File DSN connection strings. See "Using a connection string" for syntax and detailed information for supported connection string types.
- User ID and password authentication
- Kerberos authentication
- Connection failover
- Connection pooling
- TLS/SSL server authentication
User ID and password authentication
This string includes the options used to connect using user ID and password authentication (No Encryption).
DRIVER=DataDirect 8.0 SAP ASE Wire Protocol;NetworkAddress=MyServer, 5000;
Database=MyDB;LogonID=jsmith;Password=secret;
For more information on these options and values, see User ID/password authentication.
Kerberos authentication
This string includes the options used to connect using Kerberos authentication (No Encryption).
DRIVER=DataDirect 8.0 SAP ASE Wire Protocol;AuthenticationMethod=4;
NetworkAddress=MyServer, 5000;Database=MyDB;
GSSClient=gss123;
For more information on these options and values, see Kerberos authentication.
Connection failover
- The driver attempts to retry connection up to four times if the initial attempt fails.
- The driver waits five seconds between connection attempts.
- The driver attempts primary and alternate servers in random order.
DRIVER=DataDirect 8.0 SAP ASE Wire Protocol;
NetworkAddress=MyServer, 5000;Database=MyDB;
AlternateServers=(NetworkAddress=MyServer1, 5001:
Database=MyDB1,NetworkAddress=MyServer2, 5002:
Database=MyDB2);ConnectionRetryCount=4;
ConnectionRetryDelay=5;LoadBalancing=1;FailoverMode=0;
LogonID=jsmith;Password=secret; For more information on these options and
values, see Failover support.Connection pooling
This string includes the options used to connect using connection pooling.
DRIVER=DataDirect 8.0 SAP ASE Wire Protocol;Pooling=1;
ConnectionReset=0;LoadBalanceTimeout=0;MaxPoolSize=100;
MinPoolSize=0;NetworkAddress=MyServer, 5000;
Database=MyDB;LogonID=John;Password=secret; For more information on these
options and values, see DataDirect connection pooling.TLS/SSL server authentication
This string configures the
driver to use the TLS/SSL server authentication for data encryption. In this configuration,
since ValidateServerCertificate=1, the driver validates the certificate
sent by the server and the host name specified by
HostNameInCertificate.
DRIVER=DataDirect 8.0 Progress SAP ASE Wire Protocol;
NetworkAddress=MyServer, 5000;Database=MyDatabase;
EncryptionMethod=1;HostNameInCertificate=MySubjectAltName;
Truststore=TrustStoreName;TruststorePassword=TSXYZZY;
ValidateServerCertificate=1;LogonID=jsmith;Password=secret; For more
information on these options and values, see TLS/SSL encryption.