Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

A first chance exception of type 'Oracle.DataAccess.Client.OracleException

955804Aug 14 2012 — edited Aug 15 2012
Error 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 12 2012
Added on Aug 14 2012
2 comments
844 views