[Qt-interest] Open read-only sqlite database
Martin Hofius
Martin at hofius-online.com
Sun Sep 27 20:01:28 CEST 2009
Hi,
Am Sonntag, 27. September 2009 schrieb Andreas Unger:
> Hello all,
>
> I'm using the qt sqlite database driver and it works well on a *nix
> platform. However the statically compiled app on windows CE doesn't work.
> SQLITE shows up on QSqlDatabase::drivers(), so its supported for sure, but
> for some reason, I do not get any results back when I execute my query.
>
> 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?
>
> Cheers,
> Andreas
Greetings
Martin
More information about the Qt-interest-old
mailing list