Hi, i am filling a dataset with the contents of a table based on an sql query (see below) If you can imagine, i have textboxes on the form, which i want to bind to the results inside the dataset. ie, the second column in tblCar is carNo, so i want the carNo to be displayed in txtCarNo. This goes on for all the columns.
I want to somewhat replicate how access forms work, so the user can use buttons to scroll through the record set. I am unsure on how this would work, do i need a for each loop? very unsure of syntax for this...
Please could you guys advise me on a) how to bind specific parts of data from the dataset to controls on my form, and b) how i can scroll through the recordset by using buttons i.e. one going previous and one next(even first and last would be good)
Any good tutorials out there, let me know...
Cheers, kind regards,
Alex
I want to somewhat replicate how access forms work, so the user can use buttons to scroll through the record set. I am unsure on how this would work, do i need a for each loop? very unsure of syntax for this...
VB.NET:
Public Sub selectRecords()
Dim sql As String = "SELECT * FROM tblCar"
Dim conn As OleDbConnection = carDba.getCn
Dim da As OleDbDataAdapter = New OleDbDataAdapter(sql, conn)
Dim ds As DataSet = New DataSet
da.Fill(ds, "returnedCars")
End Sub
Please could you guys advise me on a) how to bind specific parts of data from the dataset to controls on my form, and b) how i can scroll through the recordset by using buttons i.e. one going previous and one next(even first and last would be good)
Any good tutorials out there, let me know...
Cheers, kind regards,
Alex