[Interest] how to properly close a SQLite database?

Bo Thorsen bo at vikingsoft.eu
Wed Jun 25 11:37:47 CEST 2014


Hi Fransisco,


Den 25-06-2014 10:56, Francisco Ares skrev:
> Thanks, Constantin.
>
> Do you know if is it possible to have two QSqlDatabase objects (using 
> SQLite driver, of course), in the same program?  I think I will make 
> some tests with its "clone" function.

You can do this with named connections. The difference is that usually 
we don't give a database connection a name, because there is only one.

However, since you mentioned that you use sqlite, you need to be certain 
that you are working on another file. You can't have two open sqlite 
write access connections to the same database.

Bo.

-- 
Viking Software
Qt and C++ developers for hire
http://www.vikingsoft.eu




More information about the Interest mailing list