How do I specify connection attributes for my ODBC data source that are not configurable in odbc.ini?

If you need to specify additional attributes, pass them in the connection string to SQLDriverConnect().

For Perl, refer to How do I supply connection string attributes in my Perl DBI->connect call?

For PHP, add the attributes to the connection string passed to odbc_connect(). Separate the attributes with semicolons. For example, if you call odbc_connect with:

odbc_connect("mydsn","username", "password")

and want to pass the ENG attribute, use:

odbc_connect("mydsn;ENG=engine","username","password")

The ODBC-ODBC Bridge maps SQLConnect calls to SQLDriverConnect, if the connection string contains DSN=. If you're using a Driver Manager, the connection string limit is 32 characters (SQL_MAX_DSN_NAME), which restricts the number of attributes you can supply.

For applications that you have the source code for, find the SQLDriverConnect call and add your attributes to the InConnectionString. If the application uses SQLConnect, change it to use SQLDriverConnect. (Refer to the demo.c program in the ODBC-ODBC Bridge examples directory for a SQLDriverConnect example.)