Oracle connector

N

Nicolae Braduceanu

I want to get a connection to a Oracle database in myPage.aspx
I used the VS control and the wizard report succesfull connecting test.

The connection is defined
Conn1 As System.Data.OleDb.OleDbConnection

the connectionString property is
Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User
ID=user;Password=pass; Data Source=dbInst_IP;Extended Properties=""

when I need to get some data from database context is like this

Private Sub btnSeek_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSeek.Click
If Conn1.State <> ConnectionState.Open Then
Conn1.Open()
End If

OleDbDataAdapter1.Fill(DataSet11)
txtNrInreg.Text = DataSet11.Tables(0).Rows(0).Item(0)
End Sub

At runtime the application stop at line
Conn1.Open()
with error
System.Data.OleDb.OleDbException: No error information available:
REGDB_E_CLASSNOTREG(0x80040154).


Any ideeas?, please!!

Nicolae Braduceanu
 
H

Hans Kesting

I want to get a connection to a Oracle database in myPage.aspx
I used the VS control and the wizard report succesfull connecting test.

The connection is defined
Conn1 As System.Data.OleDb.OleDbConnection

the connectionString property is
Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User
ID=user;Password=pass; Data Source=dbInst_IP;Extended Properties=""

when I need to get some data from database context is like this

Private Sub btnSeek_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSeek.Click
If Conn1.State <> ConnectionState.Open Then
Conn1.Open()
End If

OleDbDataAdapter1.Fill(DataSet11)
txtNrInreg.Text = DataSet11.Tables(0).Rows(0).Item(0)
End Sub

At runtime the application stop at line
Conn1.Open()
with error
System.Data.OleDb.OleDbException: No error information available:
REGDB_E_CLASSNOTREG(0x80040154).


Any ideeas?, please!!

Nicolae Braduceanu

a) there is also System.Data.OracleClient with classes specifically for
Oracle. You might need an extra reference to the assembly to be able to
access that namespace.

b) the classes in that OracleClient namespace need a local Oracle
client installation (including a correct tnsnames.ora), maybe that's
also the case for the OleDb classes?

Hans Kesting
 
N

Nicolae Braduceanu

Sorry,
I forgot to tell you that I'm using VS 2002 version.
I couldn't find in it a reference to System.Data.OracleClient to add in
Project->Add Reference... section.
Oracle Client is already installed on this computer.

The funny thing is that I put on my aspx page an OleDBDataAdapter and test
it with Preview Data tool.
I get the correct data in that form.


Nicolae Braduceanu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top