// SQLite error reference

SQLITE_CANTOPEN_ISDIR: the path is a directory

SQLite was asked to open a database at a path that is a directory, not a file.

Result code
SQLITE_CANTOPEN_ISDIR
Name
526
Category
Extended result codes
Error message
unable to open database file

What it means

SQLITE_CANTOPEN_ISDIR (526) is an extended SQLITE_CANTOPEN code: the open failed because the path is really a directory. A path built from a folder setting with the file name missing is the usual cause.

Common causes

  • A configuration value that holds the data directory instead of the database file path.
  • Joining paths in a way that drops the file name.

How to fix it

  1. Pass the full path to the database file, including its name, for example /var/lib/app/app.db rather than /var/lib/app.

Related errors

More extended result codes errors

The code and message text are from the SQLite result and error codes documentation. Browse the full SQLite error list or search every database error.

// fewer errors, faster fixes

Work on SQLite in SQLly

A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for SQLite and the other databases you use.