# Database Provider Engine (Engine `dbp`)

The `dbp` engine provides low-level access to the enaio® database — connection pool management, generic `SELECT`/`Command`, transaction control, schema introspection (tables, columns, indexes) and writing large binary data.

====
These are **internal functions of the administrative clients and the enaio® Windows Rich Client**. The jobs are not intended for custom integrations and are not described in this documentation. For SQL queries from your own applications, use [ado.ExecuteSQL](ado.md#ado.ExecuteSQL) instead.
====

## Documented Procedures

* [dbp.GetDbInfo](dbp.md#dbp.GetDbInfo)
* [dbp.IsUnicodeDatabase](dbp.md#dbp.IsUnicodeDatabase)

## Undocumented Endpoints

The following jobs are offered by the enaio® server in the `dbp` engine:

Connection pool::
`dbp.PoolClear`, `dbp.PoolDisable`, `dbp.PoolEnum`, `dbp.PoolRemove`

Queries and bindings::
`dbp.BindCommandEx`, `dbp.BindSelectEx`, `dbp.Command`, `dbp.LVCSelect`, `dbp.ParseCommand`, `dbp.Select`

Transactions::
`dbp.Commit`, `dbp.RollBack`, `dbp.StartTransaction`, `dbp.StopTransaction`

Schema introspection::
`dbp.DBGetInfo`, `dbp.GetColumnInfo`, `dbp.SelectColumns`, `dbp.SelectTableIndexes`, `dbp.SelectTables`

Schema changes and maintenance::
`dbp.DropColumn`, `dbp.DropIndex`, `dbp.UpdateStatistics`

Binary data::
`dbp.WriteBinLargeData`

<a id="dbp.GetDbInfo"></a>

## dbp.GetDbInfo

This job returns information about the underlying database of the enaio® server, in particular the database management system (DBMS) in use.

====
The `dbp` namespace (presumably "Database Provider") is not listed in the official enaio® server API engine overviews. This description was reconstructed from the call code of the enaio® gateway (`dms-enaio` library).
====

### Input Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `Flags` | INT | Yes | Reserved; always pass `0`. |

### Output Parameters

| Name | Type | Dependency | Description |
|---|---|---|---|
| `DBMSType` | INT | — | Numeric code of the DBMS in use. Known values: `8` = Microsoft SQL Server, `28` = Oracle. Other values should be treated as "unknown". |

### Return Value

`(INT)`: `0` = job successful, otherwise error code.

### See Also

[ado.ExecuteSQL](ado.md#ado.ExecuteSQL) — direct SQL execution against the database

<a id="dbp.IsUnicodeDatabase"></a>

## dbp.IsUnicodeDatabase

This job returns whether the underlying database of the enaio® server is configured for Unicode (column encoding `NCHAR`/`NVARCHAR`/`NCLOB` on MSSQL or `NVARCHAR2`/`NCLOB` on Oracle).

====
The `dbp` namespace is not listed in the official enaio® server API engine overviews. This description was reconstructed from the call code of the `enaio-jobs-custom` template.
====

### Input Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `Flags` | INT | Yes | Reserved; always pass `0`. |

### Output Parameters

| Name | Type | Dependency | Description |
|---|---|---|---|
| `Value` | BOOL | — | `true` if the database uses Unicode columns, otherwise `false`. |

### Return Value

`(INT)`: `0` = job successful, otherwise error code.

### See Also

* [dbp.GetDbInfo](dbp.md#dbp.GetDbInfo) — returns the DBMS (MSSQL/Oracle)
