By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,558 Members | 1,177 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,558 IT Pros & Developers. It's quick & easy.

vb.net Access Oracle 10.2 (connect string ?)

P: 10
Hi,
I am struggeling to connect to an Oracle db 10.2 through vb.net.

Oracle client is installed on my maschine, Oracle.DataAccess in referenced in my app. this is how my code looks like:
Dim oradb As String = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOC OL=TCP)(HOST=57.24.110.z)(PORT=1521)))" _
+ "(CONNECT_DATA=(SID = pegtest)))" _
+ "User Id=xxx;Password=yyyy)"

Dim conn As New OracleConnection(oradb)
conn.ConnectionString = oradb
Dim sql As String = "select * from dbao.tb_rstr_actv" ' VB.NET
Dim cmd As New OracleCommand(sql, conn)
cmd.CommandType = CommandType.Text
conn.Open()
Dim dr As OracleDataReader = cmd.ExecuteReader()
dr.Read()
MsgBox("1 = " & dr.Item(0).ToString)
MsgBox("2 = " & dr.Item(1).ToString)

The code runs through to conn.open() and bombs out with a "Procedure call or argument is not valid"

I did ping the oracle server and was successful. I did succesfully connect to the Oracle server using the Net Manager under the "Configuration and Migration Tools for Oracle. With vb.net - no success.
Please help.
Regards Francois
Apr 26 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.