none
Not able to use 64 bit ODBC drivers in Visual Studio 2008 RRS feed

  • Question

  • Hi,

    I am having a very similar problem mentioned in

    http://social.msdn.microsoft.com/forums/en-us/adodotnetdataproviders/thread/20E229E2-947E-4AFD-9599-9A1F666D3B52

    However, the difference is I am trying to use the Service now ODBC driver. I am having problems installing the 32 bit service now driver. I am able to install the 64 bit driver, but this does not appear in my Visual Studio IDE.

    I am trying to create an SSIS and when trying to add a new ADO connection, I am getting the list of 32 bit DSNs only. I am not getting any of my 64 bit DSNs.

    Alternatively, when I try use a OdbcConnection class in my vb code for the same DSN, it worked.

    I tried using the same connection string that I use in the VB program, it gave me an architecture incompatible issue.

    I also tried changing the Run64bit runtime to True in the Project -> properties -> debug window. It dint help too.

    I am using Windows 2008 R2, VS2008 and SQL 2008.

    I came across the following response in one of the blogs. But I am not sure if this still holds good, as I believe many of the others complaining are having the converse problem of looking up 32 bit drivers.

    Appreciate your suggestions and assistance.

    -Prad

    Irrespective of whether your Microsoft SQL Server instance is 64-bit, the Visual Studio IDE is a 32-bit application and as a result all OLE DB and .Net Providers must be 32-bit, along with any subsequently interfaced components such as ODBC drivers. (This is whay you cant choose any 64=bit DSNs as datasources & if you create a 32-bit DSNs you will error with an architecture mismatch)

    This means that when you are developing and debugging SSIS, SSAS, & SSRS applications you will require a 32-bit Provider and where necessary the 32-bit ODBC drivers.

    When run your final SSIS, SSAS package, if it is deployed against a Microsoft SQL Server instance which is 64-bit, it will require a 64-bit Provider and where necesaary a 64-bit ODBC driver.

    Therefore, with 64-bit instances of Microsoft SQL Server you will require both 32-bit and 64-bit components to allow ease of use in taking advantage of the available features

    It was worse with Visual Studio 2005 on a 32-bit OS, the 64-bit compilers were not installed by default, you will need to go to custom setup and check the option.

    Bottom Line, you can create ODBC DSNs that are 32-bit and then compile your code and have the equivalent DSNs (Same, etc) on your production x64 environment... Its beyond my ability to understand why VS2005 through VS2010 allow you to compile x64 code, but limit your ability to use x64 drivers where necessary.... There are always methods to work around an issue....

    • Moved by Bob Beauchemin Thursday, July 7, 2011 3:22 PM Moved to a more relevent forum (From:.NET Framework inside SQL Server)
    • Moved by Vicky SongMicrosoft employee Friday, July 8, 2011 7:19 AM (From:Visual Studio Database Development Tools (Formerly "Database Edition Forum"))
    Wednesday, July 6, 2011 11:45 PM

Answers

  • I would highly recommend using a DSN-less connection, unless there is some reason you need to use a DSN. You should just be able to specify an ODBC connection string when creating a new Data Connection, which will be independent of the platform it is running under. This would at least allow you to use the Data Designer in the IDE if you have the 32-bit ServiceNow ODBC Drivers installed and will not require a change when running the app 64-bit.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Friday, July 8, 2011 3:11 PM

All replies

  • Hi Prad,

    I am moving your thread to the ADO.NET forum so that you can get better support.

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, July 8, 2011 7:21 AM
  • Hi Prad,


    Welcome to the Forum.

    I hope you could show me  How to install  the 64bit ODBC drive.  I only  find the "odbcad32.exe" in the C:\Windows\SysWOW64.

    There is a 32bit ODBC service and a 64bit ODBC now, so we shouldn't use the default drive.
    You can try to "create a new connection", in the database expert dialog and try to find the 64Bid ODBC drive.

    I hope that would be help you .

     

    Thanks to all the participators.

     


     


    David Peng [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.




    Friday, July 8, 2011 8:50 AM
    Moderator
  • I would highly recommend using a DSN-less connection, unless there is some reason you need to use a DSN. You should just be able to specify an ODBC connection string when creating a new Data Connection, which will be independent of the platform it is running under. This would at least allow you to use the Data Designer in the IDE if you have the 32-bit ServiceNow ODBC Drivers installed and will not require a change when running the app 64-bit.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Friday, July 8, 2011 3:11 PM