none
ODBC Driver Not connecting to SQL Server

    Question

  • I have an app using ODBC 32 bit connection to SQL Server 2008.

    At one of my client, all the workstation except one is connecting well to the server using ODBC32 bit System DSN.

    One of the workstation, show the server on dropdown list but doesn't connect. I have disabled the firewall on the workstation to eliminate the security issue.

    The workstation is Windows 7 so I tried to make the same connection using ODBC 64bit driver and the System DSN connected without any problem.

    Is there a way  I can remove and resinstall 32 bit version of ODBC? or any alternate solution someone can provlde..

    Thanks,

    Monday, August 25, 2014 2:50 PM

Answers

  • Hi JDoshi,

    Are you use Windows 7 64 bit Operating System? If so, we must create the ODBC data source with the ODBC Administrator in %windir%\SysWOW64\odbcad32.exe.

    A 64-bit Windows operating system has two odbcad32.exe files:

    • %SystemRoot%\system32\odbcad32.exe is used to create and maintain data source names for 64-bit applications.

    • %SystemRoot%\SysWOW64\odbcad32.exe is used to create and maintain data source names for 32-bit applications, including 32-bit applications that run on 64-bit operating systems.

    If you have any feedback on our support, please click here.

    Regards,


    Elvis Long
    TechNet Community Support

    Wednesday, August 27, 2014 6:44 AM

All replies

  • Can you generate trace and analyze the logs?

    You don't need to remove or re-install 32 bit version.

    http://support.microsoft.com/kb/942976

    To work around this problem, use the appropriate version of the ODBC Administrator tool. If you build and then run an application as a 32-bit application on a 64-bit operating system, you must create the ODBC data source by using the ODBC Administrator tool in %windir%\SysWOW64\odbcad32.exe. To indicate the type of DSN, you can add "_32" to the 32-bit user DSNs and "_64" to the 64-bit user DSNs.

    --Prashanth

    Monday, August 25, 2014 2:58 PM
  • Hi Prashanth,

    Thanks for quick response.

    I have verified that I am using the correct version of ODBC.

    As I mentioned in the original post, that If I create DSN using 64bit ODBC then connection is successful but only when I create DSN using 32bit ODBC I am facing issue connecting.

    How do I generate the trace log before I creating DSN?

    Monday, August 25, 2014 3:25 PM
  • You can't generate the logs unless you create DSN. I thought you are having issue while connecting to system.

    Lets do this way, Can you export the any working workstation registry entries (ODBC.INI) and create a DSN on the problematic machine? just export and import corresponding reg entry?.

    --Prashanth

    Monday, August 25, 2014 3:31 PM
  • Can you please elobarate these steps in little more detail? I need to send them to Client's IT support team.

    Thanks again,

    Monday, August 25, 2014 3:46 PM
  • logon to the workstation - where you are able to make successful connection

    Browse the registry for the below key

    HKey_Local_Machine\SOFTWARE\ODBC\ODBC.INI 

    and right the click the corresponding entry and export it

    Import the file on the problematic server and double click it and try to test for the connection

    --Prashanth

    Monday, August 25, 2014 3:55 PM
  • Hi JDoshi,

    Are you use Windows 7 64 bit Operating System? If so, we must create the ODBC data source with the ODBC Administrator in %windir%\SysWOW64\odbcad32.exe.

    A 64-bit Windows operating system has two odbcad32.exe files:

    • %SystemRoot%\system32\odbcad32.exe is used to create and maintain data source names for 64-bit applications.

    • %SystemRoot%\SysWOW64\odbcad32.exe is used to create and maintain data source names for 32-bit applications, including 32-bit applications that run on 64-bit operating systems.

    If you have any feedback on our support, please click here.

    Regards,


    Elvis Long
    TechNet Community Support

    Wednesday, August 27, 2014 6:44 AM