jeva39
Well-known member
This code don't work. Please, what is wrong?
VB.NET:
Private Sub Prueba_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim con As OleDbConnection
Dim cmd As OleDbCommand
Dim reader As OleDbDataReader
Me.con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Application.StartupPath & "\caritas.mdb"
con.Open()
cmd = New OleDbCommand("Select * from Prestamo order by nombre", con)
reader = cmd.ExecuteReader()
myGrid.DataSource = reader
myGrid.DataBind()
con.Close()
End Sub