
D Eloquence Library
int cc = idb_unlock(base,qual,mode,status) int base; void *qual; int mode; int status[10];The parameters are:
| Mode | Target | Description |
|---|---|---|
| 1 | database | Unlock database. All locks for the database are released. |
| 3 | data set | Unlock data set. A lock mode 3/4/13/14 for the specified data set is released. |
| 5 | predicate | Unlock predicate. A lock mode 5/6/15/16 is released.. The qualifier must match the idb_lock qualifier argument. |
In addition to the "official" modes above, idb_unlock also accepts and translates the following mode values:
Mode 2/11/12 is mapped to 1
Mode 4/13/14 is mapped to 3
Mode 6/15/16 is mapped to 5
This makes it possible to use the same idb_lock and idb_unlock modes.
| Element | Meaning |
|---|---|
| 0 | S_OK |
| 1 | unchanged |
| 2 | unchanged |
| 3 | unchanged |
| 4 | 0 |
| 5 | DB_UNLOCK | (open_mode << 12) |
| 6 | 0 |
| 7 | 0 |
| 8 | mode |
| 9 | 0 |
if(idb_unlock(dbid,"",1,status))
error_handler();
This will release all locks for given database.