If your code is in the event handler of a button's click event, you will always get the first returned record.
What you should do is read the dataSource into a dataSet (or just dataTable), use dataBindings for the textBoxs, and then adjust the position of the BindingContext. This method will save you many trips to the dataSource.
Here is a link to some good articles regarding ADO.NET on the MSDN site: Using ADO.NET
If you are using Visual Studio, you can use the Data Form Wizard to create all the dataBindings; Next, Previous, First, and Last Record Buttons; Record count (Record X of Y); and Update, Cancel, and Load buttons.
i use the below code to navigate my record to next record but it give problem..
can anyone help me c where did i went wrong. or iszit my coding for my loading of data is wrong. cos for my loading of data, i use data reader to read from my database and load to my window form,it is wrong iszit because it only read the first data, that y i cant run my next button?
Protected mybindingManagerBase As BindingManagerBase
mybindingManagerBase.Position += 1
Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click