Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, January 2008
Re: Proper way to close/reopen a database


Message 1 in thread

Thomas Rock wrote:
> I'm trying to open a database, read some data then close the database. 
> Later on, I need to open the database again and read more data. However, 
> the second open causes the following error:
> 
> SqlDatabasePrivate::addDatabase: duplicate connection name 
> 'qt_sql_default_connection', old connection removed.
> 
> I'm using Qt 4.3.2 on Linux. Here's some example code showing the 
> problem. Thanks.
> 
> [snip]

Ah, I figured it out. Just can't add the same database driver multiple 
times.


--
 [ signature omitted ]