PDA

View Full Version : QODBC Visual studio



Suths
6th March 2012, 21:38
Hi all,

You must excuses me if i have posted this question in the wrong forum, it's my first time :).

I'm currently using visual studio 2008 with qt 4.74, and i have navigated to the ~Qt\4.7.4\src\plugins\sqldrivers\odbc path run qmake, then nmake (for both debug and release), and then nmake install (debug & release). I have then added the debug version to my path file, and tried the following lines of code:


QSqlDatabase db = QSqlDatabase::addDatabase("QODBC", "MyDatabase");
db.setHostName("LOCALHOST\\SQLEXPRESS");
db.setDatabaseName("test");
db.setUserName("...");
db.setPassword("...");


However i keep getting messages about Qt being unable to find the QODBC3 driver. Have i missed out a step any where?

Thanks in advance