How to create a DSN / ODBC connection

This guide explains how to create a DSN (Data Source Name) / ODBC (Open Database Connectivity) connection to an Access database on your Loopia Windows hosting, and why we recommend OLEDB (Object Linking and Embedding, Database) instead. A DSN connection is an ODBC-based connection to your database.

Why we recommend OLEDB over ODBC

The Microsoft ODBC Provider for Access has many known problems, and we therefore advise our customers not to use it. Known issues include that it is not thread safe, that the connection has caused data corruption, and that code which previously connected to the database successfully has suddenly stopped working with no obvious cause.

Microsoft itself recommends that you, to the greatest extent possible, use OLEDB to connect to Access databases.

We recommend the following connection string with OLEDB:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &_
Server.MapPath("/") &_
"..db/databas.mdb;"

The connection string above assumes that the ASP script connecting to the database is saved in the /example.com/public_html/ directory (replace example.com with the domain name you have with us) and that the database databas.mdb is saved in /example.com/db/.

If you still want a DSN / ODBC connection

If you still want a DSN / ODBC connection to your database, please send the path and the name of your database to support@loopia.com along with your customer number so we can create this connection and send the name of it to you.

Was this article helpful?

Related Articles