PDA

View Full Version : Problems with ODBC and QT when changing computer



Prosit
23rd March 2012, 15:14
I have developed part of a database manager in QT and it all works fine, i can read tables and show its data, remove rows etc.
BUT now i try to continue developing this program on a different computer it all breaks down. I can compile the project just fine, there is no errors, however when i run it and try to connect to the database the program feezes for a about 20seconds(im guessing its trying to connect for a while) then it comes back to life and was unable to connect. The message i get from QSqlDatabase::lastError() is: “[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). QODBC3: Unable to connect”

I am sure that the server exists and that i have access because i can use the MSSQL management studio to connect without problems. On the new computer i have compiled the ODBC driver from the same QT source as on the first and i can see that the QODBC driver is available.

I’m all out of ideas on this and i would love some help.