News for hackers. Stuff that matters.
Re:How to Corrupt an SQLite Database File by joe_the_user on Saturday October 05, 2013 @08:39PM (#6502614)
Great stuff and all but can I ask why SQL folks make it hard for an application to get simple read access to a SQLite database? Especially, I have an application which wants to use the Firefox places-bookmarks-etc db file. I can copy the file to a different directory and then run a query on it but can't open it in place for reading, for just reading. WTF is the problem with that? Is reading a file a way to corrupt it?
Re:How to Corrupt an SQLite Database File by simscitizen on Saturday October 05, 2013 @09:01PM (#6502671)
Use sqlite3_open_v2 with the SQLITE_OPEN_READONLY flag. It's been there for several releases now.
Re:How to Corrupt an SQLite Database File by malkia on Saturday October 05, 2013 @08:49PM (#6502638)
Try using pragma read_uncommited=1; For my stuff I use the sqlite3_backup api to "copy" the database into another, or in memory - then read from memory normally.