Problem with Oracle Data Provider
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-oracle' list.


Valmir M Meneses
Hi There,
I have installed .NET Oracle Data Provider beta 1 in a server with .NET =
framework and Oracle 8i.
As I compile my ASPX file an error reports that it can not instantiate the =
OracleConnection Object.
I have the < Import namespace=3D"System.Data.OracleClient"> before the =
line. I have already tried the full reference=20
Dim Con as System.Data.OracleClient.OracleConnection=20
and the error still remains.
Any clues?
Thanks,

Reply to this message...
 
    
Moua, Xay
You need to set it as a reference. Importing will only allow you to use it
without a lot of typing.

-----Original Message-----
From: Valmir M Meneses [mailto:Click here to reveal e-mail address]
Sent: Friday, May 24, 2002 9:31 AM
To: ngfx-oracle
Subject: [ngfx-oracle] Problem with Oracle Data Provider

Hi There,
I have installed .NET Oracle Data Provider beta 1 in a server with .NET
framework and Oracle 8i.
As I compile my ASPX file an error reports that it can not instantiate the
OracleConnection Object.
I have the < Import namespace="System.Data.OracleClient"> before the line. I
have already tried the full reference
Dim Con as System.Data.OracleClient.OracleConnection
and the error still remains.
Any clues?
Thanks,

| [ngfx-oracle] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-oracle.asp = JOIN/QUIT

Reply to this message...
 
    
Moore, Matthew
And where did you get this provider? I've wanted to play with it!!

Matt

-----Original Message-----
From: Valmir M Meneses [mailto:Click here to reveal e-mail address]
Sent: Friday, May 24, 2002 9:31 AM
To: ngfx-oracle
Subject: [ngfx-oracle] Problem with Oracle Data Provider

Hi There,
I have installed .NET Oracle Data Provider beta 1 in a server with .NET framework and Oracle 8i.
As I compile my ASPX file an error reports that it can not instantiate the OracleConnection Object.
I have the < Import namespace="System.Data.OracleClient"> before the line. I have already tried the full reference
Dim Con as System.Data.OracleClient.OracleConnection
and the error still remains.
Any clues?
Thanks,

Reply to this message...
 
    
Leon P Ford

You can find the Oracle Data Provider at
http://www.microsoft.com/downloads/release.asp?ReleaseID=37805

I have used this data provider and I have found that some things don't work
the same as using the equivalent calls using the oledb version connected to
the same database.

Assuming you are connecting to an Oracle database on a Unix server, the key
to getting the oracle connection to work is you must have the oracle client
software installed on the local computer, with the necessary service names
defined (I am connecting to an oracle 8.0.6 database)

This is the way I use it with success to get data from a select statement:

Dim cnn As New OracleConnection()
Dim cmd As New OracleCommand()
Dim dreader As OracleDataReader

dim strConnectionString = "Server=<your oracle service name>;" & _
"Integrated Security=false;" & _
"User ID=<your db user id>;" & _
"Password=<your db user password>;"
cnn.ConnectionString = <connection string data goes here>
cmd.Connection = cnn
cmd.CommandText = "select <selection list here> from <table name here>
where <criteria here>"

'
---------------------------------------------------------------------------
' Open the database and execute the command to put the data into the
data
' reader. This returns a single row of data.
'
---------------------------------------------------------------------------

cnn.Open()
dreader = cmd.ExecuteReader(CommandBehavior.SingleRow)
If dreader.Read() Then
<your code here to reference the columns of the datareader using
dreader("column name") syntax>
End If

'
---------------------------------------------------------------------------
' Close the datareader and database connection.
'
---------------------------------------------------------------------------

dreader.Close()
cnn.Close()

"Moore, Matthew"
<Click here to reveal e-mail address To: "ngfx-oracle" <Click here to reveal e-mail address>
.navy.mil> cc:
Subject: [ngfx-oracle] RE: Problem with Oracle Data Provider
05/24/2002 12:39
Please respond
to "ngfx-oracle"

And where did you get this provider? I've wanted to play with it!!

Matt

-----Original Message-----
From: Valmir M Meneses [mailto:Click here to reveal e-mail address]
Sent: Friday, May 24, 2002 9:31 AM
To: ngfx-oracle
Subject: [ngfx-oracle] Problem with Oracle Data Provider

Hi There,
I have installed .NET Oracle Data Provider beta 1 in a server with .NET
framework and Oracle 8i.
As I compile my ASPX file an error reports that it can not instantiate the
OracleConnection Object.
I have the < Import namespace="System.Data.OracleClient"> before the line.
I have already tried the full reference
Dim Con as System.Data.OracleClient.OracleConnection
and the error still remains.
Any clues?
Thanks,

| [ngfx-oracle] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-oracle.asp = JOIN/QUIT

Reply to this message...
 
 
System.Data.CommandBehavior
System.Data.OracleClient.OracleCommand
System.Data.OracleClient.OracleConnection
System.Data.OracleClient.OracleDataReader




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com