Solved

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

Posted on 2003-11-16
6
12,272 Views
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.

Rgds
Inderjeet
0
Comment
Question by:isbhatia
6 Comments
 

Expert Comment

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

Thanks.
0
 

Author Comment

by:isbhatia
ID: 9769493
Hi,
   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

Regards
Inderjeet
0
 

Accepted Solution

by:
Cavada12 earned 50 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"'.

'Code************

'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;"
                    conn.Open()

'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
MyDataGrid.DataBind()
dr = comm.ExecuteReader()

'Always be sure to close your connection
conn.close()

I hope this help.
Let me know if your need any clarification on this.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Expert Comment

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


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


Sorry.
0
 

Expert Comment

by:pratap_surisoft
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..?

Pratap
0
 

Expert Comment

by:bnucougar
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.

thanks!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Uploading files to the web server has become common part of almost any kind of web application. People use different technologies to solve this, but regardless of the technology used, it is always useful to have some kind of progress indicator shown…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now