dandl wrote:
> Message: 13
> Date: Wed, 25 May 2016 10:23:08 +1000
> From: "dandl" <[email protected]>
> To: "'SQLite mailing list'" <[email protected]>
> Subject: [sqlite] What could be the cause of a zero length database
>       file?
> Message-ID: <[email protected]>
> Content-Type: text/plain;     charset="us-ascii"
> 
> The sequence is:
> * open a new database file
> * issue a sequence of several SQL commands in a single transaction (one
> BEGIN, one COMMIT at the end).
> 
> The database ends up as a zero length file. Is this
> a) a normal consequence of the above if the single transaction is
> aborted
> (say due to an SQL error)

I have found that I create zero-length files when I pass a mis-spelled filename
to a command-line application using the sqlite3_open16() API; if the file
doesn't exist it is created as a zero-length file when any read transaction is
attempted even if no write activity is actually performed. Where is
sqlite3_open16_v2() when you want it ? I have to explicitly check file existence
(probably a good thing anyway) or coerce the widestring pathname to UTF8 for
sqlite3_open_v2().
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to