# DB Error 100 in Infor LN and Baan: Record or End of Set Not Found

> Source: https://netray.co/erp-help/db-error-100-infor-ln-baan-record-not-found
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## Short answer

DB error 100 in Infor LN and Baan is a not-found condition from the database layer: a read, find or next-record operation found no record matching the key, or reached the end of the result set. It is often harmless control flow in well-written 3GL code, but it becomes a visible error when a script does not test for it.

## Kind

error

## System

infor-ln

## Erp

Infor LN / Baan

## Module

Database layer / 3GL scripts

## Query

db error 100 infor ln

## Alternate Queries

- db error 100 in baan
- baan db.error 100 record not found
- infor ln error 100 end of set

## Applies To

Infor LN 10.x and Baan IV/V 3GL scripts, DALs and sessions; exact numeric meanings should be confirmed against your porting set error list

## Steps

### How to trace and fix db error 100

**Items:**

- Note the exact session, the table (shown in the error text) and the action the user took when the error appeared.
- Reproduce it with the same data. If it only occurs for one record, the key values are the clue: a missing master record, a mismatched key, or a deleted row.
- Run the session under the Application Debugger or with the debug option and break where the database operation is called. Inspect the key fields of the table record before the call.
- Check the return value of the operation with the db error function right after the call, and confirm that the number is the not-found code in your porting set error list.
- Look for a missing reference: a child record points to a parent that was archived, deleted or never existed in this company (cross-company data is a common reason).
- Look for a wrong index: the code searches on one index but the key fields are filled for another.
- Fix the data if the record should exist, or fix the script to test for the not-found condition and branch instead of continuing with an empty record.
- Recompile in Studio and retest with the same record and with a record that does exist.

## Sections

### What the code means in practice

**Body:**

The LN and Baan database layer returns a status after every operation. A not-found result is part of normal logic: select statements with a selectempty section, or a db.next loop that ends when no more rows exist. The value becomes an error only when code uses the record buffer after a failed read as if it were valid.

Confirm the numeric meaning against your porting set. The brief for this page treats 100 as record or end-of-set not found, which matches how it commonly appears; if your error list shows a different name, trust the list for your platform.

### Handling it in 3GL code

**Body:**

Use the structured select form so the not-found case is explicit. The selectdo section runs per record, selectempty runs when nothing matched, and selecterror handles real errors. Code that uses the older db.find style should check db.error() immediately after the call and before touching the buffer.

For reads inside DAL hooks, an incorrect not-found handler can turn a harmless missing optional record into a rolled-back transaction. Keep the handling local, return a clear message, and avoid swallowing other errors in the same branch.

**Code:**

select tccom001.*
from   tccom001
where  tccom001._index1 = {:cuno}
selectdo
    process.record()
selectempty
    mess("customer.not.found", 1, cuno)
selecterror
    abort.transaction()
endselect

### Common root causes

**Body:**

Data causes: orphaned child rows after a purge, a table copied between companies without its parents, and keys with trailing blanks or different case than the master. Code causes: a loop that does one db.next too many, searching with the wrong index, or a customization that assumes the first record always exists.

If the error is intermittent, suspect concurrency: another user or a job deleted or moved the record between the check and the read. Wrap the read and the update in one transaction and test the result of each step.

## Pitfalls

- Using the record buffer after a not-found read, which still holds stale values from the previous record.
- Treating every non-zero db.error as the same and hiding real errors behind a not-found branch.
- Searching with the wrong index for the key fields that were filled.
- Testing only with a record that exists, so the not-found path is never exercised.
- Fixing the symptom in the script when orphaned data is the real problem.

## Ai Angle

For recurring db error 100 cases, the quickest diagnostic is finding orphaned references. An assistant grounded in your LN database can list child rows with no parent for the table named in the error, read-only, and show the query used. Corrections go through your normal change process.

## Faq

### What does db error 100 mean in Baan?

**Answer:** It is the not-found status of a database operation, meaning no record matched the key or the end of the set was reached. Verify the exact numeric mapping in the error list of your porting set.

### Is db error 100 always a bug?

**Answer:** No. Loops end on it, and selectempty sections handle it deliberately. It is a bug only when code ignores it and continues using the record buffer as if a record was found.

### How do I debug a database error in LN?

**Answer:** Run the session under the Application Debugger, break at the database call, inspect the key fields and read the db error value immediately after the operation. Studio lets you recompile and retest the fixed script.

### Can bad data cause db error 100?

**Answer:** Yes. Orphaned child records, data copied between companies without its masters, and keys with trailing blanks are common causes. Compare the key in the failing record with the master table.

## Search terms

db error 100 infor ln, db error 100 in baan, baan db.error, infor ln record not found, baan selectempty, infor ln 3gl debug, baan end of set, infor ln application debugger

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
