Click to See Complete Forum and Search --> : Connect to Oracle database with ADO.net
ygz
June 13th, 2003, 04:25 PM
I have a question about accessing Oracle 8i database with ADO.net. I know that for Oracle 9i, odp.net can be used - but how to connect to Oracle 8i database? I used System.Data.oledb, it can't connect. I download and installed OracleClient, and added into References, but it can't even create the OracleConnection object. Please help.
Thank you!
bigal1
June 19th, 2003, 11:48 AM
How are you creating the connection object? Please Post a snippet of code.
Al
ygz
June 22nd, 2003, 11:08 AM
With system.data.oracleClient, the following statement causes crash:
Dim conn As New OracleConnection()
The error message says: Unhandled exception of tye 'System.IO.FileNotFoundException' occurred in microsoft.visualbasic.dll
I have:
Imports System
Imports System.Data
Imports System.Data.OracleClient
With System.Data.OleDb, the code is as follows:
Imports System.Data.OleDb
Public Sub OpenOraDB()
Dim pConn As New OleDbConnection()
dim pConnStr as string = "Provider=MSDAORA;User ID=User;Password=Pwd;Data Source=LSPD;Integrated Security=SSPI"
pConn.ConnectionString = pConnStr
pConn.Open()
End Sub
It crashs at pConn.Open(). The error message says: Unhandled exception of tye System.Data.OleDb.OleDbException' occurred in system.data.dll
Olix
October 15th, 2004, 11:26 PM
For me it worked using this connection str, with u're example:
"User ID=User;Password=Pwd;Data Source=LSPD"
Oracle 9i
When using Provider property I'm getting exception from the begining.
The Security property is not harmfull at the begining, but using it will cause an error message of "invalid username/pass".....
good luck. :thumb:
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.