Hi All,
Situation:
Consider the following code snippets, one in C++ and one in C#.
C++:
_bstr_t connStr(L"Provider=OraOLEDB.Oracle;Data Source=dbsource;User ID=username;Password=pass"
HRESULT hr = g_pConnection->Open(bstrConnStr, L"", L"", 0);
C#:
string connStr = "Provider=OraOLEDB.Oracle;Data Source=dbsource;User ID=username;Password=pass";
OleDbConnection MyConnection = new OleDbConnection(connStr);
MyConnection.Open();
In an environment Win2K, Oracle Client 8.1.7 both of these pieces of code work fine, but on a Win2K machine with Oracle 9 client installed the C++ program containing the C++ snippet above returns a "Provider could not be found...." error on the ->Open(... statement, while the C# program works fine. My understanding is that ADO.NET still uses native OLEDB internally so basically those 2 pieces of code are executed in a fairly similar fashion internally. Both oracle installations include the "Oracle Provider for OLEDB". For reasons beyond this discussion I am unable to install Oracle 8 client on the second machine. Has anyone experienced a similar problem? Not necessarily with a Oracle OLEDB provider, and if yes has anyone been able to resolve it. I would appreciate any suggestions tips.
Thanks in advance.
Cheers,
Roman
Situation:
Consider the following code snippets, one in C++ and one in C#.
C++:
_bstr_t connStr(L"Provider=OraOLEDB.Oracle;Data Source=dbsource;User ID=username;Password=pass"
HRESULT hr = g_pConnection->Open(bstrConnStr, L"", L"", 0);
C#:
string connStr = "Provider=OraOLEDB.Oracle;Data Source=dbsource;User ID=username;Password=pass";
OleDbConnection MyConnection = new OleDbConnection(connStr);
MyConnection.Open();
In an environment Win2K, Oracle Client 8.1.7 both of these pieces of code work fine, but on a Win2K machine with Oracle 9 client installed the C++ program containing the C++ snippet above returns a "Provider could not be found...." error on the ->Open(... statement, while the C# program works fine. My understanding is that ADO.NET still uses native OLEDB internally so basically those 2 pieces of code are executed in a fairly similar fashion internally. Both oracle installations include the "Oracle Provider for OLEDB". For reasons beyond this discussion I am unable to install Oracle 8 client on the second machine. Has anyone experienced a similar problem? Not necessarily with a Oracle OLEDB provider, and if yes has anyone been able to resolve it. I would appreciate any suggestions tips.
Thanks in advance.
Cheers,
Roman