2009-06-15 04:36:49 UTC
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
Try
cn = New OleDbConnection("Provider Microsoft.Jet.OLEDB.4.0;DataSource=c:\emp.mdb;Jet OLEDB:Database")
cn.Open()
cmd = New OleDbCommand("select * from table1 ", cn)
dr = cmd.ExecuteReader
While dr.Read()
TextBox1.Text = dr(0)
TextBox2.Text = dr(1)
TextBox3.Text = dr(2)
' loading data into TextBoxes by column index
End While
Catch
End Try
End Sub
End Class
i am getting only message not any error that is
" A first chance exception of type 'System.ArgumentException' occurred in System.Data.dll"