M
mydotnetdoubt
Hai All ,
Pls see the code bellow i'm geeting error on ( Dim dr As New
OleDbDataReader )
what is it
-----------------------------------------------------------------------------
Imports System.Data.OleDB
-----------------------------------------------------------------------------
Public Class Form1
Inherits System.Windows.Forms.Form
Dim myConnection As OleDbConnection
Dim myCommand As OleDbCommand
Dim dr As New OleDbDataReader
-----------------------------------------------------------------------------
Windows form Designer generated Code
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
myConnection = New
OleDbConnection("Provider=MSDAORA.1;UserID=abcd;password=abcd;
database=ora")
Try
myConnection.Open()
myCommand = New OleDbCommand("Select * from invoicemaster",
myConnection)
dr = myCommand.ExecuteReader()
While dr.Read()
MessageBox.Show("Invoice Code " & dr(0))
MessageBox.Show("Invoice No" & dr(1))
MessageBox.Show("Invoice Date" & dr(2))
End While
dr.Close()
myConnection.Close()
Catch ex As Exception
End Try
End Sub
End Class
-----------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%
(2) Pls provide some example code which is communicating with oracle
using oledb
(3) What is the relvnt method to connect to oracle (Oledb/Odbc/ODP net)
Pls help
meeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.....................
Thanks
Nau
Pls see the code bellow i'm geeting error on ( Dim dr As New
OleDbDataReader )
what is it
-----------------------------------------------------------------------------
Imports System.Data.OleDB
-----------------------------------------------------------------------------
Public Class Form1
Inherits System.Windows.Forms.Form
Dim myConnection As OleDbConnection
Dim myCommand As OleDbCommand
Dim dr As New OleDbDataReader
-----------------------------------------------------------------------------
Windows form Designer generated Code
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
myConnection = New
OleDbConnection("Provider=MSDAORA.1;UserID=abcd;password=abcd;
database=ora")
Try
myConnection.Open()
myCommand = New OleDbCommand("Select * from invoicemaster",
myConnection)
dr = myCommand.ExecuteReader()
While dr.Read()
MessageBox.Show("Invoice Code " & dr(0))
MessageBox.Show("Invoice No" & dr(1))
MessageBox.Show("Invoice Date" & dr(2))
End While
dr.Close()
myConnection.Close()
Catch ex As Exception
End Try
End Sub
End Class
-----------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%
(2) Pls provide some example code which is communicating with oracle
using oledb
(3) What is the relvnt method to connect to oracle (Oledb/Odbc/ODP net)
Pls help
meeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.....................
Thanks
Nau