Apparently VS 2008 and 2010 do not support MSDORA.1 in the 64-bit environment, so I need to move the the Oracle Provider. I've downloaded and installed the Oracle 11g provider packages successfully, but am unsure as to how to incoroporate it into the VB connection string. The following is the 32-bit Microsoft provider code:
Public strConnection As String = "Provider=MSDAORA.1;password=xxxx;user id=xxx;data source=xxxxxxx"
Public cnConn As OleDbConnection = New OleDbConnection(strconnection)
Public dscmd As New OleDbDataAdapter(strSelect, cnConn)
Public cmdresults As Boolean
Just replacing "MSDAORA.1" with "OraOLEDB" does not work.
[OS is Windows 7 Pro 64x, Visual Studio 2008 and 2010]
Any help for this woud be appreciated.
The proper thing is "oraoledb.oracle", not "oraoledb".
What error do you get?
What Oracle client did you install? 32 bit or 64 bit?
VS2008 projects default to target cpu of AnyCPU, which means it will run as 64 bit process on 64 bit OS.
VS2010 projects default to x86, which means it will run as 32 bit even on a 64 bit OS.
Greg Edited by: gdarling on Oct 5, 2011 9:04 AM
Also, you may want to consider using the Oracle Data Provider for .NET rather than OLEDB.
Thanks for the response and sorry, but I am using OraOLEDB.Oracle, not just OraOLEDB.
I installed the 11g 32-bit client to allow connection to 10g database and use of Toad. This client is running fine in Toad and SQL-plus.
The error is "The 'OraOLEDB.Oracle' provider is not registered on the local machine."
This is the same error received regarding "MSDAORA.1" that was installed by Visual Studio 2008.
VS2008 doesn't install MSDAORA btw, it comes with the operating system, and only comes in 32 bit flavor (there is no 64 bit msdaora).
Anyway, what do you have targetCPU set to in the project properties? VS2008 defaults to AnyCPU, VS2010 defaults to x86.
If it's AnyCPU, it will run as a 64 bit process, so you'll need 64 bit oracle client software installed. Or, switch it to x86 and it will run as a 32 bit process and work with your 32 bit client install (and msdaora for that matter).
CONNECTION TIMEOUT=300;DATA SOURCE=tnsitemname;MIN POOL SIZE=5;MAX POOL SIZE=100;STATEMENT CACHE SIZE=5000;USER ID=MyId;PASSWORD=MyPwd;
This connection string can use native provider. To use System.Data.OracleClient you can use
Data Source=tnsitemname;user id=MyId;Password=MyPwd;
Further connection strings can be taken from www.connectionstrings.com