Last post Oct 18, 2016 11:03 PM by Lannie
Oct 14, 2016 08:54 PM|gunderj|LINK
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.
Oct 15, 2016 02:15 AM|Lannie|LINK
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.
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.
Oct 16, 2016 02:18 AM|gunderj|LINK
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
Oct 16, 2016 11:00 PM|Lannie|LINK
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.
Oct 17, 2016 04:15 AM|gunderj|LINK
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?
Oct 17, 2016 10:25 PM|Lannie|LINK
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.
Oct 18, 2016 05:13 AM|gunderj|LINK
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.
Oct 18, 2016 11:03 PM|Lannie|LINK
If you can migrate to ODP.NET managed or unmanaged driver, well let me know. I gave up on ODBC over 10 years ago!!