[Interest] how to properly close a SQLite database?

Rainer Wiesenfarth Rainer_Wiesenfarth at Trimble.com
Wed Jun 25 12:03:59 CEST 2014


From: Bo Thorsen
> 
> 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.

Just to add: Take a look at the second parameter of
QSqlDatabase::addConnection() and read the "Detailed Description" of the
QSqlDatabase documentation. Doing so may make things more clear - like the
idea of having a "default" connection.

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6277 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140625/a0ec45fd/attachment.bin>


More information about the Interest mailing list