This string includes the options you may need to connect with LDAP authentication.
Note: The strings demonstrated in this section use the DSN-less format. For additional formats, see "Using a connection string."

This string includes the options used to connect with LDAP authentication.

DRIVER=DataDirect 8.1 MongoDB;AuthenticationMethod=17;DatabaseName=database;
  HostName=hostname;PortNumber=port;User=user_name;Password=password;
  [attribute=value[;...]];

where:

database
(optional) specifies the name of the database to which you want to connect. This value is used as the default qualifier for unqualified table names in SQL queries.
Note: This value is case-insensitive if you have access privileges to query the list of databases on the server. If you do not have access, this value is case-sensitive.
hostname
the name or the IP address of the server to which you want to connect. For example, myserver.
port

specifies the port number of the server listener. The default is 27017.

user_name
(optional) specifies the user name that is used to connect to the MongoDB database. For example, jsmith.
password
specifies the password used to connect to your MongoDB database.
attribute=value
specifies connection option settings. Multiple option attributes are separated by a semi-colon.
Important: When LDAP authentication is enabled, credentials are passed in clear text. Therefore, you should use LDAP authentication only on servers that are configured for TLS/SSL encryption.
Note: The User and Password options are not required to be stored in the connection string. They can also be sent separately by the application using the SQLConnect ODBC API. For SQLDriverConnect and SQLBrowseConnect, they will need to be specified in the connection string.

The following example connection string includes the options required for connecting with LDAP authentication:

DRIVER=DataDirect 8.1 MongoDB;AuthenticationDatabase=17;DatabaseName=mydb;
       HostName=myserver;PortNumber=27017;User=jsmith;Password=secret;