Connection string - White-Owl/nisql GitHub Wiki

The connection string for NISQL is using the ODBC standard for connection strings. The format of that string is described in a function SQLDriverConnect().

Which in short boils down to:

  • If your database does not require login credentials or the credentials can be stored inside the DSN, then the connection string can be just a: DSN=MyDSN
  • If you have to pass the credentials from outside the DSN, then the connection string become: DSN=MyDSN;UID=user;PWD=password
  • If you require some additional connection options (and cannot store them inside the DSN): DSN=MyDSN;UID=user;PWD=password;key1=val;key2=val
  • If you by some reason cannot create a DSN, you can use: DRIVER={some ODBC driver};key1=val;key2=val

The list of additional keys and which values they can have are described in the documentation of your RDBMS and its ODBC drivers.