SQLite Forum

CLI Read Only Mode
Login

CLI Read Only Mode

(1) By anonymous on 2020-12-21 13:23:54 [link] [source]

Scope for enhancing the documentation?

An error. "readonly" is not a valid option for the "mode" parameter.

My Session

SQLite version 3.34.0 2020-12-01 16:14:00
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .open file:./db/sales.db?mode=ro
sqlite> .databases
main: D:\SQLite32\db\sales.db r/o
sqlite> create table xyz (abc text);
Error: attempt to write a readonly database
sqlite>
sqlite>

(2) By Richard Hipp (drh) on 2020-12-21 13:31:56 in reply to 1 [link] [source]

I don't understand the request. How exactly do you propose that the documentation be enhanced?

(3) By anonymous on 2020-12-21 13:43:45 in reply to 2 [link] [source]

The documentation says "readonly" is not a valid option for the "mode" parameter.

In my session I have .open file:./db/sales.db?mode=ro

That opens the database in read only mode.

By way of enhancing the documentation, perhaps adding something like this: "To open a database in read only mode, use mode=ro and not mode=readonly

Just a suggestion.

(4) By Richard Hipp (drh) on 2020-12-21 14:52:36 in reply to 3 [source]