Solved Qt and MS Sql Server
-
Can someone show and example on how to connect to a ms sql server from Qt, without to use odbc?
Is there a library to connect to all the sql server type similar to ado? -
@mrdebug said in Qt and MS Sql Server:
Can someone show and example on how to connect to a ms sql server from Qt, without to use odbc?
i am not sure if that this is possible at all (with Qt's default sql plugins).
Whats wrong with ODBC? -
Because my software has to be easy to install.
During the installation the customer has to extract all the data from the old software and it is not possible that the customer has to create the odbc dsn.
The best way is to use ado but QAxObject does not work.
Strangely QAxObject works through odbc but not with a ado string connection to a ms sql server.I did a research of an external library to do this but I haven't found nothing.
-
Hi, before I switched to Qt I used MFC, and when I needed SQL Server connectivity I included 2 files in my project: ado2.h and ado2.cpp, they had a good interface/bridge between C++ and ADO.
You could try it, article here
-
Many thanks!
I see it is necessary to register to the website. Is there another place where I can download it? -
Finally I had to implement directly the ado api, found in the Microsoft website.
I did not understood why QAXObject works only through odbc. -
Does this shed some light?
https://stackoverflow.com/questions/41198357/how-to-use-adodb-connection-in-qt-and-query-database
-
Unfortunately not. My problem is related to the access at a MS Sql Server database through Ado across the network, without using odbc.