none
The specified DSN contains an architecture mismatch between the Driver and Application RRS feed

  • Question

  • Hi

    I am getting below error when I try to create connection string from my .net application using user DSN. (sql datasource -> Microsoft odbc driver.. test connection)

    ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

    My system is

    Trying to connect Oracle 11 DB.

    Windows 7 64bit so installed ODBC driver from

    http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html

    I am able to set ODBC User DSN and it works fine. When I test the connection from User DSN it says succeed. But when I try to consume that DSN from .net application I am getting this error.

    Some post says enable target platflorm to x86 instead of Any CPU. But in my system When I try to add new settings in Configuration Manager I didn't find option for x86. Still I manually typed and tried and it didnt work.

    Please help. What is missing in my system.

    • Moved by ArthurZ Wednesday, January 15, 2014 3:59 PM
    Wednesday, January 15, 2014 11:45 AM

Answers

  • Is your DSN is 32 bit or 64 bit?

    If you are using 32 bit DSN, your applications target platform should be X86.


    Happy Coding.

    Regards,
    Jaliya Udagedara (MCPD,MCSD) | My Blog

    Thursday, January 16, 2014 6:24 AM
  • Sakthimind--I think it is an issue of x86 vs. 64 -b  mismatch.  If you're on a 64 bit system, you can create a dsn connection on either the 64 bit side or the 32 bit side--and each version of the odbc app will only see its side. For 32-b = %WINDIR%\SysWOW64\odbcad32.exe; for 64-b = %WINDIR%\System32\odbcad32.exe  . confusing since both are dubbed odbcad32

    Call up each version of the ODBC app to see where your dsn really resides-- or look in the registry if you created a user dsn on the 64-b side  of odbc which is visible to the 32-b program (system dsn can't see it) and can't tell.

    If you determine that  you need the 32-bit odac with the oracle developer tools for visual studio,there is a downloadable version on the oracle web site.


    Wednesday, January 15, 2014 4:28 PM

All replies

  • Sakthimind--I think it is an issue of x86 vs. 64 -b  mismatch.  If you're on a 64 bit system, you can create a dsn connection on either the 64 bit side or the 32 bit side--and each version of the odbc app will only see its side. For 32-b = %WINDIR%\SysWOW64\odbcad32.exe; for 64-b = %WINDIR%\System32\odbcad32.exe  . confusing since both are dubbed odbcad32

    Call up each version of the ODBC app to see where your dsn really resides-- or look in the registry if you created a user dsn on the 64-b side  of odbc which is visible to the 32-b program (system dsn can't see it) and can't tell.

    If you determine that  you need the 32-bit odac with the oracle developer tools for visual studio,there is a downloadable version on the oracle web site.


    Wednesday, January 15, 2014 4:28 PM
  • Is your DSN is 32 bit or 64 bit?

    If you are using 32 bit DSN, your applications target platform should be X86.


    Happy Coding.

    Regards,
    Jaliya Udagedara (MCPD,MCSD) | My Blog

    Thursday, January 16, 2014 6:24 AM
  • Like many, I struggled with this issue for many weeks before finally stumbling on the solution.

    Background on mine:

    Application created originally in Visual Basic 2005, then upgraded in Visual Studio 2008, and than again in VS 2010... all on 32 bit XP.

    Application was moved to 64 bit windows and problems ensued.  Solution was finally found when forcing the VS build (as suggested in many forums) to X86.  The key was this was not easily found at first as the below images show a different version of VS than I was using.

    On the compile page of the project properties, there was no alternative selection for CPU type in the platform drop down - only "any CPU" was available.

    But in the "Advanced Compile Options" I was able to select the x86 type under the target CPU and it works perfectly now.  I hope this helps others with the struggles I have had.


    Senior IT Systems Administator

    Monday, April 7, 2014 1:22 PM