|
'First take the access library to the dataset
dim olecon as New OleDb.OleDbConnection ("Provider = Microsoft.Jet.OLEDB.4.0; Data Source =" + Application.StartupPath + "\Students.mdb; User Id = admin; Password =;")
olecon.Open ()
dim oleadp As OleDb.OleDbDataAdapter
dim ds as new dataset
oleadp = New OleDb.OleDbDataAdapter ("select * from student where id = 1", olecon)
oleadp.Fill (ds, "student")
'Set the binding
textbox1.DataBindings.Add (New Binding ("Text", ds, "student.name")) |
|