ERROR : The 'OraOLEDB.Oracle' provider is not registered on the local machine.

Posted on 2003-11-16
Medium Priority
Last Modified: 2007-12-19
Hi All,
        I am working with Dot Net and Oracle 9i. I have installed Oracle 9i client on my machine. I am able to work in "sqlplusw" and run queries there. But when I try to run the program code, it is giving the following error :
  The 'OraOLEDB.Oracle' provider is not registered on the local machine.

What can be the matter ? I reinstalled Oracle 9i but no use......

Kindly help.

Question by:isbhatia
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 9766773
Hi Inderjeet,
can you post the namespaces that you are using in your .aspx file?


Author Comment

ID: 9769493
   The namespaces that I am using in my .aspx page are :

Imports System.Data
Imports System.Data.OleDb

Do I need to use some other namespace also ?

Let me tell you one of my findings. When I am trying to connect to database using VB, i am successful. But with the same connection string , I am getting error in ASp.NEt

Kindly Help


Accepted Solution

Cavada12 earned 200 total points
ID: 9771260
If you are using .Net I would suggest using the .NET Managed Provider for Oracle(http://www.microsoft.com/downloads/details.aspx?familyid=4f55d429-17dc-45ea-bfb3-076d1c052524&displaylang=en).  You need to download this to the server you are running your pages on, and then in the page declaration of the asp page ("<%@ Page Language="VB" %>") add this line:

CompilerOptions='/R:"C:\Program Files\Microsoft.NET\OracleClient.Net\System.Data.OracleClient.dll"'.


'Delcare Oracle Objects
                Dim conn As New OracleConnection()
                Dim comm As New OracleCommand()
                Dim dr As OracleDataReader

'Set connection string and open conn
                    conn.ConnectionString ="Data Source=database;User Id=uid;Password=pwd;"

'This is where your query code would go
                    comm.CommandText = "YourProcedureName"
                    comm.CommandType = CommandType.StoredProcedure

'If you have any Parameters:
comm.parameters.add(New OracleParameter("v_YourParamName", OracleType.varchar)).Value = "Value"
'Execute your command
comm.Connection = conn

'Place a <ASP:Datagrid> in a form on the page and set its datasource to dr to test
MyDataGrid.DataSource = dr
dr = comm.ExecuteReader()

'Always be sure to close your connection

I hope this help.
Let me know if your need any clarification on this.
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI


Expert Comment

ID: 9771305
Sorry I pasted a couple of lines in the wrong order:

dr = comm.ExecuteReader()
should come before:
MyDataGrid.DataSource = dr


Expert Comment

ID: 10595169
Hi isbhatia,
Iam facing the same problem and iam also using OleDb, did u solve the problem without using System.Data.OracleClient.dll which was suggested by Cavada12..?


Expert Comment

ID: 11027812
Hi Cavada12,
I change my code with your solution
But I meet another problem that unable to load oci.dll, can you help me to deal with it.


Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question