Connect to a remote ODBC database source without a DSN


THE INFORMATION IN THIS ARTICLE APPLIES TO:

  • EFT v8 and later

DISCUSSION

Using an ODBC source for authentication can be critical to some implementation plans; however, actually finding the correct strings and syntax to use can be challenging. An administrator can choose to use a DSN, or for even better performance ideal for large numbers of users, a DSN-less (direct) connection can be formed.

Listed below are some example connection strings for the purpose of illustrating the concept.

As always, edit appropriately and remember that your strings will vary depending on your unique environment.

DSN-less connections to an MS Access database file

To connect, you can start with something as simple as the following connection string:

DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:\path\to\eft.mdb;

If necessary, you may need to provide more information, especially in corporate environments with system usernames and passwords required:

Provider=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)}; SystemDB=c:\path\to\SYSTEM.mdw; DBQ=C:\path\to\eft.mdb;uid=username;Pwd=pass

DSN-less connections to an Oracle database source

The following string was contributed and verified by a user to work with the Oracle Instant Client for 10g:

DSN=dsnname;Server=\\servername:port\sid;Uid=username;Pwd=password

Additionally, you can try the following strings:

New version:

Driver={Microsoft ODBC for Oracle};Server=OracleServer.world;Uid=Username;Pwd=asdasd;

Old version:

Driver={Microsoft ODBC Driver for Oracle};ConnectString=OracleServer.world;Uid=myUsername;Pwd=myPassword;

DSN-less connections to a MySQL database

The following string demonstrates an example connection string for a MySQL database:

Provider=MSDASQL;DRIVER={MySQL ODBC 3.51 Driver};SERVER=10.10.10.1;DATABASE=Example;UID=myusername;PWD=mypassword;

NOTES:

  • Do not put any line breaks in your connection strings.
  • You must have MDAC version 2.7 or higher to use a DSN-less connection.