locked
VS 2013 cannot create data connection to Oracle - get IMo14 error RRS feed

  • Question

  • User1868852945 posted

    I create a data source with the 64 bit ODBC admin tool on Windows 10.  Test connection is success.

    From VS 2013 I try to add data connection...

    Click change button for Data source, select Microsoft ODBC data source.

    select the data source created above, type in user name and password, click test connection, get error:

    IMo14 the specified DSN contains an architecture mismatch between the Driver and Application

    My google search says I must be using 32 bit ODBC data source, but I am sure I used the 64 bit ODBC admin tool. (though I do have both installed)

    Can someone advise me on this?  Thanks.

    Friday, October 14, 2016 8:54 PM

Answers

  • User269602965 posted

    SQORA64.DLL is the Oracle ODBC driver which resides between Microsoft ODBC and the Oracle OCI Client.  The OCI client talks to the database listener which then contacts the database.

    I do not use Visual Studio Tools for Oracle since I just do all the programming direct and bypass the GUI interface which never met my needs anyway.

    But as I recall the Visual Studio Tools for Oracle are 32 bit only.. another reason I just program the connection and SQL calls directly as I need to operate in 32  bit and 64 bit worlds.

    Too bad you are constrained by using ODBC.  Hope your datasets are not too large because of large datasets, I also abandoned ODBC years ago.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 17, 2016 10:25 PM
  • User269602965 posted

    http://www.techrepublic.com/article/using-odbc-within-a-net-application/

    If you can migrate to ODP.NET managed or unmanaged driver, well let me know.  I gave up on ODBC over 10 years ago!!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 18, 2016 11:03 PM

All replies

  • User269602965 posted

    Forget ODBC.

    Use Oracle Data Access Managed Driver.

    1. 32-bit and 64-bit from same DLL

    2. Oracle client built into the DLL, no need to install an Oracle full SQL client or legacy GAC dependent ODP.NET unmanaged driver client

    3. Drop Managed Driver into your app /BIN folder, bring in the Oracle tnsnames,ora to provide connection information.

    4. Follow the correct web or app config configuration and imports statement to support the driver

    5. then use Oracle Data Provider code to make your connection, run queries or execute PL/SQL stored procedures.

    ODBC is SLOOOWWWW when moving large amounts of data.

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

    http://docs.oracle.com/database/121/ODPNT/toc.htm

    I have used managed driver for .NET 4.0. 4.5 console applications, WPF applications, and ASP.NET applications.

    If you need to run encryption on FIPS-140 enabled application server, or use BULK COPY, you might then use the Oracle Data Access UNMANAGED driver.

    But for standard operations like select, update, insert, delete, the Managed driver works well.

    Saturday, October 15, 2016 2:15 AM
  • User1868852945 posted

    Thanks for the feedback.  My client says we have to use ODBC like all their other apps do. 

    Someone must know what is the issue here?  Thanks

    Sunday, October 16, 2016 2:18 AM
  • User269602965 posted

    Go to COntrol Panel > Administrative Tools > ODBC > tab Drivers

    Do you see the Oracle Client installation using the Oracle Home name you established?

    Because when you go back to the DSN tab and click ADD connection you want to select the Oracle client that you installed.

    Then you will have to select the correct TNSNAMES entry that matches your database and the username (schema) you are connecting to.

    Sunday, October 16, 2016 11:00 PM
  • User1868852945 posted

    Thanks Lannie,

    Yes I do see it and I am using the 64 bit ODBC tool.  I also see the TNS in VS 2013 create data connection screen as expected. 

    I did click on the drivers tab in ODBC admin as you suggested and I see SQORA32.DLL which might have something to do with the problem.  

    Do you know if I should be seeing SQORA64.DLL?

    Thanks

    Monday, October 17, 2016 4:15 AM
  • User269602965 posted

    SQORA64.DLL is the Oracle ODBC driver which resides between Microsoft ODBC and the Oracle OCI Client.  The OCI client talks to the database listener which then contacts the database.

    I do not use Visual Studio Tools for Oracle since I just do all the programming direct and bypass the GUI interface which never met my needs anyway.

    But as I recall the Visual Studio Tools for Oracle are 32 bit only.. another reason I just program the connection and SQL calls directly as I need to operate in 32  bit and 64 bit worlds.

    Too bad you are constrained by using ODBC.  Hope your datasets are not too large because of large datasets, I also abandoned ODBC years ago.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 17, 2016 10:25 PM
  • User1868852945 posted

    Thanks again.  How do you "just program the connection directly"?

    I do not like using the VS tool either but I am still in the beginners phase.

    Tuesday, October 18, 2016 5:13 AM
  • User269602965 posted

    http://www.techrepublic.com/article/using-odbc-within-a-net-application/

    If you can migrate to ODP.NET managed or unmanaged driver, well let me know.  I gave up on ODBC over 10 years ago!!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 18, 2016 11:03 PM