VB.Net Populate DataGridView From MySQL

How To Fill A DataGridView From MySQL DataBase In VBnet

Fill Datagridview From MySQL Using Vbnet

In This VB.Net Tutorial  We Will See How To Load Data Into A Datagridview From MySQL DataBase Using Visual Basic.Net Programming Language Visual Studio Editor.


Project Source Code:

Imports MySql.Data.MySqlClient


Public Class Populate_Datagridview_From_MySQL

    Private Sub Populate_Datagridview_From_MySQL_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        Dim connection As New MySqlConnection("datasource=localhost;port=3306;username=root;password=")
        Dim table As New DataTable()
        Dim adapter As New MySqlDataAdapter("SELECT * FROM s_t_d.student", connection)

        adapter.Fill(table)

        DataGridView1.DataSource = table

        
    End Sub
End Class
      
///////////////OUTPUT:





show mysql records in datagridview using vbnet



Share this

Related Posts

:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:P
:o
:>)
(o)
:p
:-?
(p)
:-s
(m)
8-)
:-t
:-b
b-(
:-#
=p~
$-)
(y)
(f)
x-)
(k)
(h)
cheer