olekhanchai
27th May 2012, 18:47
I read two articles of internet "Asynchronous Database Access with Qt 4.x" from http://www.linuxjournal.com/article/9602
I use these code to implement the program that use network for query some of data but I got some problem that is :
1. it's warning when I reconnect to server
QSqlDatabasePrivate::removeDatabase: connection 'test.db' is still in use, all queries will cease to work.
QSqlDatabasePrivate::addDatabase: duplicate connection name 'test.db', old connection removed.
How can I implement these code to connect database once without reconnect it again when clients connect to server and can connect more than one database for multithread query?
2. If I want to return data to client in object and receive object from client side. What's the solution can solve?
This is my attach source code.
7756
Thanks for any help.
I use these code to implement the program that use network for query some of data but I got some problem that is :
1. it's warning when I reconnect to server
QSqlDatabasePrivate::removeDatabase: connection 'test.db' is still in use, all queries will cease to work.
QSqlDatabasePrivate::addDatabase: duplicate connection name 'test.db', old connection removed.
How can I implement these code to connect database once without reconnect it again when clients connect to server and can connect more than one database for multithread query?
2. If I want to return data to client in object and receive object from client side. What's the solution can solve?
This is my attach source code.
7756
Thanks for any help.