On 6 Apr 2017, at 4:04pm, Tim Streater <t...@clothears.org.uk> wrote:
> On 06 Apr 2017 at 15:33, Simon Slavin <slav...@bigfraud.org> wrote: > >> After touching, try opening the file and issuing a CREATE TABLE command. See >> whether it works or gives an error. > > The command works and the file goes from 0 to 8k bytes. Right. So you can’t tell if a file is a SQLite database or not just by opening it using the SQLite API. It might be a blank file that another program is intending to use for something else. If you’re trying to find out whether a file with a certain name exists and is a SQLite database, don’t open the file using the SQLite API. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users