[Qt-interest] Open read-only sqlite database

Andreas Unger andi.unger05 at gmail.com
Sun Sep 27 20:33:33 CEST 2009


On Sun, Sep 27, 2009 at 2:01 PM, Martin Hofius <Martin at hofius-online.com>wrote:

> > The problem right now is that when I execute db.open(), it creates the
> > database if it doesn't find it. I don't want this behavior. I'd like it
> to
> > issue an error if it doesn't find it instead of creating a new db. How do
> I
> > go about doing this?
>
> What about simply testing for the existence of the database file beforen
> calling db.open?
>

I just did that, and the file is there alright. SQLITE is one of the
supported database drivers listed in QSqlDatabase::drivers(), so I really
don't know why queries on the database return no results on the statically
built app on Win CE. It works perfectly on linux so I'm finding this very
puzzling...

Cheers,
Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090927/84830f6c/attachment.html 


More information about the Qt-interest-old mailing list