Error fixInfor LN / BaanDatabase layer / 3GL scripts

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

Error
db error 100 infor ln

Also searched as

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

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.

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

How to trace and fix db error 100

  1. 1Note the exact session, the table (shown in the error text) and the action the user took when the error appeared.
  2. 2Reproduce 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.
  3. 3Run 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.
  4. 4Check 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.
  5. 5Look 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).
  6. 6Look for a wrong index: the code searches on one index but the key fields are filled for another.
  7. 7Fix 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.
  8. 8Recompile in Studio and retest with the same record and with a record that does exist.

What the code means in practice

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

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.

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

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.

Try it here, free

Infor LN and Baan Integration Interface Specification Template

Open full tool

Fill-in functional and technical specification for an LN or Baan interface, including data flow, error handling and volumes.

Common 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.

How an ERP-grounded AI assistant handles this

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.

Frequently asked questions

What does db error 100 mean in Baan?

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?

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?

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?

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.

Related

Error fix

Infor LN Studio: compile errors when building DAL/4GL code

A compile error in LN Studio usually traces back to a missing or mismatched package reference, a real syntax error in the DAL or 4GL source, or stale generated metadata that only a full rebuild clears. Read the first error in the log, not the last, since later errors are often cascades from one root cause.

Advanced

How to extend business logic in Infor LN with DAL2

DAL2 lets you add custom validation, defaulting and calculation logic to Infor LN Enterprise Edition tables by writing a Java business logic handler class and registering it against a table event, without editing the standard DAL. Because the logic sits in your own package rather than inside Infor's base code, it survives upgrades that would otherwise overwrite a direct DAL change.

Error fix

Infor LN: "Record is locked by another user" error

This error means another LN session, interactive or batch, is holding an update lock on the same table row you are trying to change. Find the locking user or session in Active Sessions, confirm it is stale rather than genuinely running, and either wait or terminate it before you retry.

Error fix

Infor LN bshell Process Stuck at 100% CPU: How to Diagnose and Fix It

A bshell process pinned at 100% CPU on the Infor LN application server almost always means one session is stuck in a 4GL loop, scanning an unindexed table, or waiting on a database lock. End the session from the Sessions Monitor first, then kill the OS process only if that fails, and check for a blocking database transaction before assuming it is a bug.

Error fix

Infor LN Not Authorized to Run This Session: How to Fix It

Infor LN refuses to open a session with a not authorized message when the logged-in user's assigned role does not include that session, or when the session is blocked for the company they are logged into. Grant the session through Common > Authorization Management > Roles, or check the user's role and company context, and the session opens on retry. In most cases this is a permissions configuration issue, not a bug.

Error fix

Infor LN DAL Out of Sync After a Custom Field: Cause and Fix

Infor LN throws a DAL, or table, out of sync error, or simply drops a new custom field silently, when a table's dictionary definition is changed but the generated DAL and dependent forms are not regenerated afterward. Running the standard sequence, table compile, DAL generation, then session/form compile, in Tools > Development after every dictionary change resolves it. Skipping any one of the three steps is what causes the mismatch.

AI for ERP

AI for Infor LN: Sessions, BODs, and Engineer-to-Order Work

Add grounded AI to Infor LN 10.x or CloudSuite: natural-language answers over sessions and BODs, agents for project and engineer-to-order work, on-prem options.

AI for ERP

AI for Legacy Baan IV/V: Capture the Knowledge Before It Walks Out the Door

Use AI to capture knowledge from ageing Baan IV/V systems, document undocumented customisations, and de-risk a future migration to LN or CloudSuite.

Stuck on Infor LN / Baan?

Talk to engineers who work inside Infor LN / Baan every week, and who build private AI that answers these questions from your own ERP data.

Keep exploring

Free tools

ERP fixes and how-tos

Runs with your ERP

Guides

AI on your ERP

Integrations

Comparisons

Software