VB.Net: How can you navigate records on form using MySQL-Table

1. Note that first of all download .Net/MySQL connector.
Process already explained   <click Here>

2. Create or store  sample data as here

dd4

 

3. Design your form!

ss1

4. Code Behind Page!

Imports MySql.Data
Imports MySql.Data.MySqlClient
Imports System.Data
Public Class Navigate
    Dim cnn As New MySqlConnection
    Dim cmd As New MySqlCommand
    Dim ds As DataSet
    Private Sub Navigate_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        cnn = New MySqlConnection
        cnn.ConnectionString = "Server=127.0.0.1;Database=library;Uid='root';Pwd='';"
        Dim cmd As MySqlCommand = New MySqlCommand()
        cmd.Connection = cnn
        cmd.CommandText = "select * from book"
        Dim ada As MySqlDataAdapter = New MySqlDataAdapter
        ada.SelectCommand = cmd
        ds = New DataSet
        ada.Fill(ds, "book")

        BindingSource1.DataSource = ds
        BindingSource1.DataMember = "book"

        TextBox1.DataBindings.Add("Text", BindingSource1, "bcode")
        TextBox2.DataBindings.Add("Text", BindingSource1, "bname")
        TextBox3.DataBindings.Add("Text", BindingSource1, "bauthor")
        TextBox4.DataBindings.Add("Text", BindingSource1, "bpublisher")
        TextBox5.DataBindings.Add("Text", BindingSource1, "bquantity")
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        BindingSource1.MoveNext()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        BindingSource1.MovePrevious()
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        BindingSource1.MoveLast()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        BindingSource1.MoveFirst()
    End Sub
End Class

 

5. Here is running form ..

ss2