A first chance exception of type 'Oracle.DataAccess.Client.OracleException
955804Aug 14 2012 — edited Aug 15 2012Error no:ORA-12154 A first chance exception of type 'Oracle.DataAccess.Client.OracleException
Hello guys, I'm newbie in VB.net and ORACLE. I have installed
"Visual Studio 2008 Express Edition"
"Oracle Database 10g Express Edition"
and
"ODAC 11.2.0.1.2"
I wanted to create a simple data entry application so first I decided to test how to save and retrieve data from oracle database.
I was using VB.NET While I was retrieving data it shows this error.
is my configuration is good enough to create a simple data entry application with VB.NET...........my test code is
mports System.Data.OleDb
Imports Oracle.DataAccess.Client
Imports Oracle.DataAccess.Types
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim oradb As String = "Data Source=orcl;User Id=amy;Password=aman;"
Dim conn As New OracleConnection(oradb)
conn.Open()
Dim cmd As New OracleCommand
cmd.Connection = conn
cmd.CommandText = "select name from contact where sno = 1"
cmd.CommandType = CommandType.Text
Dim dr As OracleDataReader = cmd.ExecuteReader()
dr.Read()
Label1.Text = dr.Item("department_name")
conn.Dispose()
End Sub
End Class