> For the complete documentation index, see [llms.txt](https://docs.appstrategy.com/apprules-r-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appstrategy.com/apprules-r-documentation/platform/platform-features/system-settings/data-sources/connection-settings/databases/access.md).

# Microsoft Access

Connects to Microsoft Access databases (`.accdb` and `.mdb`). Tables and saved queries are exposed as tables and can be queried and updated with SQL, which is translated to the Access (Jet/ACE) dialect and executed natively by the database engine.

#### Prerequisites

The connector uses the Microsoft Access drivers installed on the machine running appRules:

* **OLE DB** (Microsoft ACE / Jet) is tried first and gives full schema support, including foreign keys.
* **ODBC** (Microsoft Access Driver) is used automatically when the OLE DB provider is not installed. Foreign key information is not available over ODBC.

Install the **Microsoft Access Database Engine Redistributable** in 64-bit as the appRules process. The legacy Jet 4.0 provider exists in 32-bit only.

#### Connection Properties

**Database**

| Property       | Default | Notes                                                                                                   |
| -------------- | ------- | ------------------------------------------------------------------------------------------------------- |
| Data Source    | —       | Required. Full path to the `.accdb` or `.mdb` file, e.g. `C:\Data\Northwind.accdb`. The file must exist |
| Provider       | `Auto`  | OLE DB provider, see below                                                                              |
| Exclusive Mode | `false` | Open the database exclusively; other users cannot open it at the same time                              |
| Read Only      | `false` | Open the database in read-only mode                                                                     |
| Open Mode      | —       | Advanced: explicit OLE DB open mode, e.g. `Share Deny None`, `Share Deny Write`. OLE DB only            |

**Provider** values:

| Value   | Driver used                    | Notes                                      |
| ------- | ------------------------------ | ------------------------------------------ |
| `Auto`  | Chosen from the file extension | `.mdb` → Jet 4.0, anything else → ACE 16.0 |
| `Jet40` | `Microsoft.Jet.OLEDB.4.0`      | Legacy `.mdb` files, 32-bit only           |
| `ACE12` | `Microsoft.ACE.OLEDB.12.0`     | `.accdb` and `.mdb`                        |
| `ACE16` | `Microsoft.ACE.OLEDB.16.0`     | `.accdb` and `.mdb` (recommended)          |

Only one open mode is applied, in this order of priority: **Exclusive Mode**, then **Read Only**, then **Open Mode**.

**Authentication**

Most Access databases need no credentials. Leave these empty unless the database is protected.

| Property          | Used by                  | Notes                                                       |
| ----------------- | ------------------------ | ----------------------------------------------------------- |
| Database Password | Password-protected files | The password set on the database file itself                |
| User              | Workgroup security       | User account; Access uses `Admin` when empty                |
| Password          | Workgroup security       | Password for the user account                               |
| System Database   | Workgroup security       | Path to the workgroup information file (`.mdw`); must exist |

**Logging**

| Property  | Default                                                                     | Notes                         |
| --------- | --------------------------------------------------------------------------- | ----------------------------- |
| Log Level | `0`                                                                         | `0` disabled, `1` log to file |
| Log File  | `%APPDATA%\appStrategy\PortalData\Default\Logs\Connectors\Access_Debug.log` |                               |

The log shows which engine was selected (OLE DB or ODBC) and the SQL sent to Access.

#### Supported SQL

**Tables and columns**

* Every table and saved query in the database is exposed as a table. Access system tables (`MSys…`) are hidden.
* Names containing spaces or special characters are written in square brackets: `[Order Details]`.
* Primary keys, indexes and foreign keys are read from the database (foreign keys with OLE DB only).

**SELECT**

```sql
SELECT * FROM Customers
SELECT CustomerID, CompanyName FROM Customers WHERE Country = 'France' ORDER BY CompanyName
SELECT o.OrderID, c.CompanyName
FROM Orders o INNER JOIN Customers c ON o.CustomerID = c.CustomerID
WHERE o.OrderDate >= @from
```

| Clause   | Supported                            |
| -------- | ------------------------------------ |
| Columns  | `*` or a list of column names        |
| JOIN     | Joins between tables of the database |
| WHERE    | See operators below                  |
| ORDER BY | One or more columns, `ASC` / `DESC`  |

**WHERE operators**

| Operator                        | Example                            |
| ------------------------------- | ---------------------------------- |
| `=`, `<>`, `>`, `>=`, `<`, `<=` | `UnitPrice >= 100`                 |
| `LIKE`                          | `CompanyName LIKE 'A%'`            |
| `IN`, `NOT IN`                  | `Country IN ('France', 'Ireland')` |
| `IS NULL`, `IS NOT NULL`        | `ShippedDate IS NULL`              |
| `AND`, `OR`, parentheses        | `A = 1 AND (B = 2 OR C = 3)`       |

**INSERT, UPDATE, DELETE**

```sql
INSERT INTO Customers (CustomerID, CompanyName, Country) VALUES ('CONTO', 'Contoso', 'France')
UPDATE Customers SET Country = 'Ireland' WHERE CustomerID = 'CONTO'
DELETE FROM Customers WHERE CustomerID = 'CONTO'
```

* UPDATE and DELETE without a WHERE clause affect every row of the table.
* AutoNumber columns are generated by Access and are not written on insert.
* Saving records through a workflow target requires the table to have a primary key (used to locate the row to update or delete).
* Writes are refused when **Read Only** is set.

**Parameters**

Named parameters are supported in WHERE conditions and values:

```sql
SELECT * FROM Orders WHERE CustomerID = @customer AND OrderDate >= @from
```

**Transactions**

Transactions are supported and are handled by the Access engine.

&#x20;

&#x20;

&#x20;

&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appstrategy.com/apprules-r-documentation/platform/platform-features/system-settings/data-sources/connection-settings/databases/access.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
