Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt and MS Sql Server
Forum Updated to NodeBB v4.3 + New Features

Qt and MS Sql Server

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 4 Posters 3.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mrdebug
    wrote on 22 Sept 2017, 14:01 last edited by mrdebug
    #1

    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?

    Need programmers to hire?
    www.labcsp.com
    www.denisgottardello.it
    GMT+1
    Skype: mrdebug

    R 1 Reply Last reply 22 Sept 2017, 14:03
    0
    • M mrdebug
      22 Sept 2017, 14:01

      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?

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 22 Sept 2017, 14:03 last edited by raven-worx
      #2

      @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?

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mrdebug
        wrote on 22 Sept 2017, 14:08 last edited by mrdebug
        #3

        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.

        Need programmers to hire?
        www.labcsp.com
        www.denisgottardello.it
        GMT+1
        Skype: mrdebug

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hskoglund
          wrote on 22 Sept 2017, 20:00 last edited by
          #4

          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

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mrdebug
            wrote on 23 Sept 2017, 07:10 last edited by
            #5

            Many thanks!
            I see it is necessary to register to the website. Is there another place where I can download it?

            Need programmers to hire?
            www.labcsp.com
            www.denisgottardello.it
            GMT+1
            Skype: mrdebug

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mrdebug
              wrote on 25 Sept 2017, 15:53 last edited by
              #6

              Finally I had to implement directly the ado api, found in the Microsoft website.
              I did not understood why QAXObject works only through odbc.

              Need programmers to hire?
              www.labcsp.com
              www.denisgottardello.it
              GMT+1
              Skype: mrdebug

              1 Reply Last reply
              0
              • J Offline
                J Offline
                JonB
                wrote on 25 Sept 2017, 18:49 last edited by
                #7

                Does this shed some light?

                https://stackoverflow.com/questions/41198357/how-to-use-adodb-connection-in-qt-and-query-database

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mrdebug
                  wrote on 25 Sept 2017, 20:16 last edited by
                  #8

                  Unfortunately not. My problem is related to the access at a MS Sql Server database through Ado across the network, without using odbc.

                  Need programmers to hire?
                  www.labcsp.com
                  www.denisgottardello.it
                  GMT+1
                  Skype: mrdebug

                  1 Reply Last reply
                  0

                  6/8

                  25 Sept 2017, 15:53

                  • Login

                  • Login or register to search.
                  6 out of 8
                  • First post
                    6/8
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved