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. QODBC driver not loaded
Forum Updated to NodeBB v4.3 + New Features

QODBC driver not loaded

Scheduled Pinned Locked Moved General and Desktop
32 Posts 4 Posters 20.7k Views 1 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.
  • Z Offline
    Z Offline
    zidom
    wrote on last edited by
    #22

    Hi
    thanks for pursuing my problem i have problem in first part
    bq. C:\Users\username>osql -D QtODBCDSN -U qtodbclogin -P passw0rd
    it says
    [ODBC Driver Manager] Data source name not found and no default driver
    specified

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hardcodes.de
      wrote on last edited by
      #23

      Ok, I assume that you inserted your own values for <DSN>, <USERNAME> and <PASSWORD> and not simply entered

      @
      osql -D QtODBCDSN -U qtodbclogin -P passw0rd
      @

      If you use
      @
      C:\Windows\SysWOW64\odbcad32.exe
      @

      again and look into your configured DSN, can you connect to your database from within the Gui (ODBC Data Source Administrator)?

      Have you got "Sql Server Configuration Manager" on our machine? The link in the startmenu goes like "C:\Windows\SysWOW64\mmc.exe /32 C:\Windows\SysWOW64\SQLServerManager10.msc"

      In the left pane there is a menu entry "Sql Server Network Configuration", open that up, click the instance name you're using and make sure that "Named Pipes" is disabled and "TCP/IP" is enabled. That often leads to "I can not connect to server...".

      while(!sleep){++sheep;}

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        zidom
        wrote on last edited by
        #24

        i disabled the Named Pipes it was enable and TCP/IP was enable to and in
        C:\Windows\SysWOW64\odbc32.exe my dsn name that i created before is mydsn32 but in authenticity i selected with windows NT authentication using the network login id so i dont need the password and user name then in cmd what should i use for -U and -P?

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hardcodes.de
          wrote on last edited by
          #25

          Omit -U and -P, use -E instead [-E = trusted connection].

          @
          C:\Users\username>osql -?
          Microsoft (R) SQL Server Command Line Tool
          Version 10.50.1600.1 NT x64
          Copyright (c) Microsoft Corporation. All rights reserved.

          Note: osql does not support all features of SQL Server 2008 R2.
          Use sqlcmd instead. See SQL Server Books Online for details.

          usage: osql [-U login id] [-P password]
          [-S server] [-H hostname] [-E trusted connection]
          [-d use database name] [-l login timeout] [-t query timeout]
          [-h headers] [-s colseparator] [-w columnwidth]
          [-a packetsize] [-e echo input] [-I Enable Quoted Identifiers]
          [-L list servers] [-c cmdend] [-D ODBC DSN name]
          [-q "cmdline query"] [-Q "cmdline query" and exit]
          [-n remove numbering] [-m errorlevel]
          [-r msgs to stderr] [-V severitylevel]
          [-i inputfile] [-o outputfile]
          [-p print statistics] [-b On error batch abort]
          [-X[1] disable commands [and exit with warning]]
          [-O use Old ISQL behavior disables the following]
          <EOF> batch processing
          Auto console width scaling
          Wide messages
          default errorlevel is -1 vs 1
          [-? show syntax summary]
          @

          while(!sleep){++sheep;}

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            zidom
            wrote on last edited by
            #26

            i used -E Now it says
            @
            C:\Users\Zolfaghari>osql -D mydsn32 -E
            [ODBC Driver Manager] The specified DSN contains an architecture mismatch
            between the Driver and Application
            @

            1 Reply Last reply
            0
            • H Offline
              H Offline
              hardcodes.de
              wrote on last edited by
              #27

              "First hit on Google":http://msdn.microsoft.com/en-us/library/windows/desktop/ms712362(v=vs.85).aspx

              I quote

              bq. To resolve this error, use the 32-bit odbcad32.exe to configure or remove the DSN.

              while(!sleep){++sheep;}

              1 Reply Last reply
              0
              • Z Offline
                Z Offline
                zidom
                wrote on last edited by
                #28

                yes i read that and fixed the problem with cmd now there is no error in cmd but in qt still says the driver not found my code is same as yours except the user and pass my include and plugin folder are same to

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  hardcodes.de
                  wrote on last edited by
                  #29

                  And you can confirm that you compile a 32 bit program?

                  while(!sleep){++sheep;}

                  1 Reply Last reply
                  0
                  • Z Offline
                    Z Offline
                    zidom
                    wrote on last edited by
                    #30

                    I tried both

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      hardcodes.de
                      wrote on last edited by
                      #31

                      For the moment I am running out of ideas, sorry.

                      while(!sleep){++sheep;}

                      1 Reply Last reply
                      0
                      • T terenty

                        This is the string that works fine for me:
                        @QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
                        db.setDatabaseName("Driver={SQL Server};DSN='PlaneTraj';SERVER=DB-SERVER;DATABASE=RealPlanesData;");@
                        My user DSN (that I added using C:\Windows\SysWOW64\odbcad32.exe) name is PlaneTraj and its Driver is SQL Server; in your case these are ZiDoM and SQL Server (according to your pic).
                        Try using Driver={SQL Server} instead of yours DRIVER={SQL Native Client}

                        S Offline
                        S Offline
                        Smola
                        wrote on last edited by
                        #32
                        This post is deleted!
                        1 Reply Last reply
                        0

                        • Login

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