Using Microsoft Access databases in SharePoint applications

Microsoft Access databases may only be used with SharePoint applications on 32 bit systems because 64 bit systems do not support OleDbProvider.  To use a Microsoft Access database with a SharePoint application, you may either place your MDB database file in the hosting application folder or provide a full path to the MDB file.

Placing Access databases in your hosting application folder

Step 1:  Place your MDB database file into the hosting application folder and give a relative path.  For example, place the database file into:


Step 2:  Use the hosting application folder path in the database connection string in your application’s Web.config file:


Using a fully qualified path to your Access databases

Step 1:  Provide a fully qualified path to your Access database file and grant reading and writing permission to this location.  For example, your path might be:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\MyApp3\Southwind.mdb

Step 2:  Grant read/write and path discovery permissions to this folder.  Add this section to the selected Permission Set:

<IPermission  class="OleDbClientPermission"  version="1" Unrestricted="true" />

See Changing Code Access Security (CAS) for details.

Grant OleDbProvider permission to execute

Regardless of your database’s location, make sure that OleDbProvider has permission to execute, i.e. your wss_mediumtrust.config file contains an entry in the <SecurityClasses> section such as:

<SecurityClass Name="OleDbClientPermission" Description="System.Data.OleDb.OleDbPermission, System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

See Also

Locating application files on the SharePoint server

Changing Code Access Security (CAS)

Adding navigation to your application

Uninstalling (retracting) a SharePoint solution

Using Microsoft Access databases in SharePoint applications

SharePoint master page options