Question : System.Data.OleDb.OleDbExc<wbr />eption: Oracle client and networking components were not found.

I have SQLNet installed on my web server.
If drag and drop an OleDbConnection to my page with vs.Net, every think works. Testing connection is successful.
If I create the connection by myself with the following code. I get this error message on cnn.open();
(On separate page that I created with VS.Net)

code:
OleDbConnection cnn = new OleDbConnection("Provider=MSDAORA.1;Password=xx;User ID=xxxx;Data Source=xxxx");
cnn.Open();


error message:

 System.Data.OleDb.OleDbException: Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these components are installed.

Please advice.

Answer : System.Data.OleDb.OleDbExc<wbr />eption: Oracle client and networking components were not found.

Basically, when you use MSDAORA, it means that you are using MS version. You might consider to use Oracle OLEDB instead since MS version has some issues with the OCI driver somehow. If so, you can use the following connection string. Provider=OraOLEDB.Oracle;User ID=xxx;Password=xxx;Data
Source=xxx; to connect to Oracle. Please download Oracle OLEDB in case you don't have it. http://otn.oracle.com/software/tech/windows/ole_db/content.html

Or even better, you can use Oracle Data Privider for .NET to provide a better integration between .NET and Oracle at http://otn.oracle.com/software/tech/windows/odpnet/content.html if you are using Oracle 9i. I guess you're not :P

Please follow this instruction
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q255/0/84.asp&NoWebContent=1
Random Solutions  
 
programming4us programming4us