Qt 5.6.0 no odbc driver availabe - please vote for this bugfix
-
@Andy314
hi
if u look at the
https://bugreports.qt.io/browse/QTBUG-49420
to the right. there is vote.
So if u login/make account. u can vote on issue/bug.
If many vote for it, it does get more attention.
so far its
Votes: 3 Vote for this issue -
As a rookie in QT Forum,I have to say it's nervous to reply to my first comment.
Now I'm faced with the same question:No OBDC drive for the sql database.But I am not too conscious of the configure code:
cd %QTDIR%\qtbase\src\plugins\sqldrivers\odbc
qmake odbc.pro
nmakeI mean,not only I don't know its meaning ,and** more important,I don't know where to use it??(copy and paste it on the pro file which in your project?or some place else?)**Forgive me I am not too practical of QT,all I learned during my college life is 48 hours C++...
And I am not sure it's the right place to ask for help,and I don't know how to insert a picture in my comment(hyperlink???)...
-
@MartinChan
Hi and welcome
Don't be nervous. we are very friendly here.
You will do it a cmd prompt/Shell
(start, type cmd , it shows command prompt)
If you are using visual compiler, it should be its cmd prompt version.lets see
cd %QTDIR%\qtbase\src\plugins\sqldrivers\odbc
this will go to the odbc directory
type dir and check there is the odbc.pro
and then you build the odbc driver.If it dont know qmake, you might need to add to PATH the location of qmake.exe.
You can upload images to say postimage.org or other places. there is no direct upload here.
Update:
You can also open odbc.pro in Creator. That might also just work. -
@mrjj
Wow,awesome reply speed~I will try it soon and wish it work~~;)~You're very nice~~~~Another question:I am not sure about the relationship between the Qt and its opensource file:Before this question , I just use the Online Installer that Qt.io provided(MSVC2013,64bit),but in this case I found no QtBase folder under MSVC2013_64 folder,so I have to download the whole qtbase opensource...But this progress really confuses me:Is Qt just provided separated open source to people for choice? (@_@;)
Maybe it's time to reinstall the QT again...=.= -
@MartinChan
Hi
Using the installer, there is also option to install the source code.
There is a maintenance tool. I think you can get the source running that and add it.Since you took the MSVC2013 Qt, I assume you have visual studio Installed ?
(already) -
Yes~I already had installed VS2013~
FYI:Users in China can't use the postimage.org (@ @),but luckily we can have other similar websites like this.Haha~~~
-
@MartinChan
Ok. super.
Im not visual studio user but I recall it having its
own command prompt with all paths setup.
You should do the command in that one.Oh, thats odd. postimage.org is not really dangerous but I guess
there can be many reasons :) -
@mrjj
Final worked!!!Here is the pic.Although it still has some other problems ,but no more"QODBC driver is not available"makes me feel really good~~I really want to share the way I use to solve this problem(all of you know due to Qt is an open system so it changed all the time ,but I really want they add ODBC to it in the next version!)Here is the way to do with Qt5.6 and MSVC2013(64bit):
-
First,make sure you have download the qt version includes the whole opensource(or you can download it separated maybe ,I didn't try it)what else ,add the PATH(This word prepared for the rookie like me) of your qt.
-
Second,open cmd and type cd %QTDIR%\qtbase\src\plugins\sqldrivers\odbc
to get the folder includes odbc.pro file .
(Make sure the PATH thing)then type qmake odbc.pro -
Here comes another thing ,u must call the vcvarsall.bat(or vcvar32.bat) to make the nmake,here comes the question:where to find this bat file?Commonly it's your Microsoft Visual Studio 2013\VC folder ,like my computer,it's D:\Visual Studio\Visual Studio2013\VC.So don't forget to execute it before the first step,then u can make the nmake(I copy this bat file to the odbc.pro's folder,I didn't know if it has the impact. )
-
The you can find Qtbase\plugins has created a new sqldriver folder,copy all the things in it to the C:\Qt\5.6\msvc2013_64\plugins\sqldrivers (namely your compiler folder and the sqldrivers folder under it ),then ,real Done.
FYI:Thx for the people in this topic,especially @mrjj ,I really get a good feeling about that,haha~~
-
-
@MartinChan
Good work! :) -
-
First,sorry for not clearly clarify the first step.
The first is to execute the vcvarsall.bat(or vcvars32.bat,according to the version you installed)to make sure you can use nmake lately.So what you do first is like:
cd directory_of_your_vs_vc/vcvarsall.bat(vcvars32.bat may under the bin folder)
after that you can use nmake and nmake install orider.
-
@MartinChan
I tried both and neither of them work..., the same error came out when applying them. -
Thank you @MartinChan
I found out the problem and solved it finally by the question I asked in stackoverflow.Following is my experience on this issue:
-
The version of Qt creator whether 32-bit or 64-bit should be made sure before all these stuff by checking the 'About Qt creator'. It is important to choose the right version of command prompt before compiling.
-
Besides, If a 32-bit command prompt is used, then vcvars32.bat should be executed. For 64-bit, vcvarsall.bat should be executed. They are located in "%dir of you vs%/vc" and "%dir of you vs/vc/bin" respectively.
-
If any error happened during one compiling, another qmake command must be executed for next attemption.
-