You can use ODBC besides OleDB as follows:
For Access (JET) ODBC Driver
Imports System.Data.Odbc;
OdbcConnection oODBCConnection = new OdbcConnection();
oODBCConnection.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};" +
"Dbq=" + Server.MapPath(".") + "MDBPathMDBName.mdb;" +
"Uid=Admin;" +
"Pwd=";
oODBCConnection.Open();
For Access (JET) OLE DB Provider
using System.Data.OleDb;
OleDbConnection oOleDbConnection = new OleDbConnection();
oOleDbConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + Server.MapPath(".") + "MDBPathMDBName.mdb;" +
"User ID=Admin;" +
"Password=";
oOleDbConnection.Open();
OLEDB vs ODBC -- Which should you use?
Given the option, it's a no brainer to use OLEDB over ODBC. But if you are restricted as you mentioned by your ISV then ODBC might be an option.ODBC has been
around for years and is based on older and more bug laden technology. Therefore, ALWAYS use OLEDB if your server/host supports it. Microsoft even says it themselves:
When running Microsoft Jet in an IIS environment, it is recommended that you use the native Jet OLE DB Provider in place of the Microsoft Access ODBC driver. The Microsoft Access ODBC driver (Jet ODBC driver) can have stability issues due to the version of Visual Basic for Applications that is invoked because the version is not thread safe. As a result, when multiple concurrent users make requests of a Microsoft Access database, unpredictable results may occur. The native Jet OLE DB Provider includes fixes and enhancements for stability, performance, and thread pooling (including calling a thread-safe version of Visual Basic for Applications).