Imports System.Data
Imports Oracle.DataAccess.Client
I have tried to connect an oracle database using the code below.But an Error message that says :
"An unhandled exception of type 'System.DllNotFoundException' occurred in oracle.dataaccess.dll
Additional information: Unable to load DLL (OraOps10.dll).
"
so,could anybody help me to solve this problem.
Thanks in advance
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim oradb As String = "Data Source=mitdb;User Id=scott;Password=tiger;"
Dim conn As New OracleConnection(oradb)
conn.ConnectionString = oradb
conn.Open()
Dim sql As String = "select title from books where isbn > 100" ' VB.NET
Dim cmd As New OracleCommand(sql, conn)
cmd.CommandType = CommandType.Text
Dim dr As OracleDataReader = cmd.ExecuteReader 'OracleDataReader = cmd.ExecuteReader() ' VB.NET
dr.Read()
Label1.Text = dr.Item("title") ' retrieve by column name
End Sub
End Class
Imports Oracle.DataAccess.Client
I have tried to connect an oracle database using the code below.But an Error message that says :
"An unhandled exception of type 'System.DllNotFoundException' occurred in oracle.dataaccess.dll
Additional information: Unable to load DLL (OraOps10.dll).
"
so,could anybody help me to solve this problem.
Thanks in advance
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim oradb As String = "Data Source=mitdb;User Id=scott;Password=tiger;"
Dim conn As New OracleConnection(oradb)
conn.ConnectionString = oradb
conn.Open()
Dim sql As String = "select title from books where isbn > 100" ' VB.NET
Dim cmd As New OracleCommand(sql, conn)
cmd.CommandType = CommandType.Text
Dim dr As OracleDataReader = cmd.ExecuteReader 'OracleDataReader = cmd.ExecuteReader() ' VB.NET
dr.Read()
Label1.Text = dr.Item("title") ' retrieve by column name
End Sub
End Class