Hmmm...works for me on windows and Linux -- I used the default configuration 
for compiling 3.6.23.1 under Linux.
I also removed write permissions to test.db and it still worked.
 
There are a limited number of places where SQLITE_READONLY error can occur.  
Why don't you set some debug breakpoints on them and find out more info.
 
D:\SQLite>sqlite3 :memory:
SQLite version 3.6.23.1
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
COMMIT;
sqlite> .restore test.db
sqlite> .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE t(resourceType varchar);
INSERT INTO "t" VALUES('PSM');
INSERT INTO "t" VALUES('psm');
COMMIT;
 
 
Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems
 

________________________________

From: sqlite-users-boun...@sqlite.org on behalf of Alexey Pechnikov
Sent: Fri 4/30/2010 7:44 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] "restore" doesn't work



$ sqlite3 :memory:
SQLite version 3.6.23
sqlite> .restore './work.db'
Error: attempt to write a readonly database
sqlite> .q

$ sqlite3
SQLite version 3.6.23
sqlite> .restore './work.db'
Error: attempt to write a readonly database
sqlite> .q

$ sqlite3 test.db
SQLite version 3.6.23
sqlite> .restore './work.db'
sqlite> .q


--
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to