need your help to connect and get data from oracle database

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
w00000w
Posts: 1
Joined: Thu 07 Mar 2013 23:48

need your help to connect and get data from oracle database

Post by w00000w » Thu 07 Mar 2013 23:59

Hello everyone

I'm new here, and new with vb.net and oracle

I've download dotConnect for Oracle and Installed it

I've oracle database with TNSNames.ora

I tried more time to connect to oracle 10g database using vb.net ver 10 with framework 3.4 and 4

I really need your help

how to connect to oracle database using vb.net

I tired this code but when I start the project, there is an error

the error is :

System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.


This is the code I've tried but notworking Code:

Dim connString As String = "Data Source=(DESCRIPTION=" _
"(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=X.X.X.X)(PORT=1521)))" _
"(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XXX)));" _
"User Id=XXX;Password=XXX;"


'Create connection
Dim con As New OracleConnection(connString)

Try
con.ConnectionString = connString
con.Open()
Console.WriteLine("Connected to Oracle.")

Catch ex As OracleException
Console.WriteLine("Error: " & ex.ToString())
Finally
' Close Connection
con.Close()
Console.WriteLine("Connection Closed")

End Try



-------------

This my TNSNames.ora I've got it from Toad for Oracle 9.7.2

HPUXx=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=xxxxx)
(PORT=1521)
)
(CONNECT_DATA=
(SERVER=dedicated)
(SERVICE_NAME=xxxxx)
)
)

HRx=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=xxxx)
(PORT=1521)
)
(CONNECT_DATA=
(SERVICE_NAME=xxxx)
)
)

NEWPRODx=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=xxxxxxx)
(PORT=1521)
)
(CONNECT_DATA=
(SERVICE_NAME=xxxx)
)
)




I really need your help to connect and get data from oracle database using sql

thanks

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: need your help to connect and get data from oracle database

Post by Pinturiccio » Tue 12 Mar 2013 12:17

w00000w wrote:the error is :

System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.
Please make sure you are using dotConnect for Oracle (its namespace is Devart.Data.Oracle): http://www.devart.com/dotconnect/oracle ... ction.html.
According to the exception text you are using another provider (System.Data.OracleClient).

When you work with dotConnect for Oracle, you don't have to install Oracle Client, as you have the possibility to use the Direct Mode: http://www.devart.com/dotconnect/oracle ... tMode.html.

Post Reply