| Previous | Next |
| SQLITE_E_NOTADB | SQLITE_E_WARNING |
SQLITE_E_NOTICE
SQLITE_E_NOTICE (0x87AF001B) represents nonfatal SQLite notice delivered through the error log. This value corresponds to SQLite primary result code 27. It normally labels an informational anomaly reported to the callback configured with SQLITE_CONFIG_LOG, not a failed sqlite3_step result that should automatically abort business work. Apply the native SQLite state-machine rules even though Windows stores the result in an HRESULT facility.
Capture the complete log event
- Keep the extended result code, message, connection identity, and timestamp.
- Correlate the notice with the API call active on the same thread.
- Do not discard the high-order extended-code bits when Windows wraps the value as HRESULT.
Operational handling
| Pattern | Interpretation |
|---|---|
| Single recovery notice | May document automatic rollback-journal or WAL recovery. |
| Repeated notice | Can indicate a persistent environment or lifecycle problem. |
| No failed API call | Treat as telemetry unless the specific extended code requires action. |
Test logging separately
- Install the log callback before SQLite initialization
- Trigger a controlled notice in a disposable database if possible
- Verify logging does not recurse into the same database connection
Close condition
Classify the specific extended notice and verify that the database operation and integrity checks have the expected result; suppressing the callback is not a repair.
Treat notices as diagnostic side channels
A notice delivered through SQLite logging does not by itself replace the return value of the API that was executing. Correlate it by connection, statement, and timestamp, then decide whether the operation succeeded from that operation’s direct result and transaction outcome.
Questions that narrow the result
| Question | Diagnostic direction |
|---|---|
| Same input rejected elsewhere | Agreement at the same offset supports a representation or contract cause |
| Known-good sample fails locally | Attention shifts to local libraries, state, packaging, or configuration |
| Clean process behaves differently | Look for mutation, leaked state, concurrency, or cached negotiation |
| Boundary control no longer fails | Validation may have been disabled rather than corrected |
Preserve causal order
Timestamp acquisition, parsing or preparation, the call returning this result, automatic retry, and cleanup so a later network, storage, or disposal result cannot replace the original cause.
SQLite object lifetimes
| Object | Record |
|---|---|
| Database connection | Open flags, threading mode, transaction state, and latest connection error |
| Prepared statement | SQL identity, bindings, prepare API, and step call |
| Current row | Column values governed by the documented SQLITE_ROW lifetime |
| Log callback | Extended code and message retained even when the active API succeeds |
Native SQLite identity behind the result
Keep the primary and extended SQLite result before mapping it to this result, because masking the low byte or treating every HRESULT alike can erase the distinction among ROW, DONE, NOTICE, WARNING, and an extended warning.
Cleanup paths
- Finalize every statement that will not be reused
- Reset reusable statements only at a documented terminal state
- Avoid recursive SQLite use from the configured log callback
- Verify rollback, commit, and close independently from this result
Decision boundary
| Evidence | Use |
|---|---|
| Direct API return | Determines control flow for prepare, step, reset, finalize, or transaction work |
| Extended result code | Preserves the specific SQLite condition before HRESULT translation |
| Log callback event | Adds diagnostics but does not automatically replace the direct API result |
| Transaction outcome | Separately determines whether completed statement work becomes durable |
Technical references
- SQLite result and extended result codes
- SQLite sqlite3_step contract
- SQLite error logging interface
- SQLite query planner and automatic indexes
Looking for a different code? Search another status or error code.