Popular Posts

VB.Net Populate ComboBox With MySQL Data

Share it:

How To Fill A Combobox From MySQL DataBase In VbNet

Fill ComboBox From MySQL DataBase In VB.Net

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


Project Source Code:

Imports MySql.Data.MySqlClient

Public Class Populate_Combobox_From_MySQL

    Private Sub Populate_Combobox_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 adapter As New MySqlDataAdapter("SELECT `Id`, `FullName`, `Address`, `BirthDate` FROM s_t_d.student", connection)
        Dim table As New DataTable()

        adapter.Fill(table)

        ComboBox1.DataSource = table

        ComboBox1.ValueMember = "Id"
        ComboBox1.DisplayMember = "FullName"

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

VBNET Combobox With Data From MySQL




Share it:

combobox

Fill A Combobox From MySQL DataBase In Vb.Net

how to Populate ComboBox From MySQL DataBase Using VB.Net

mysql

mysql database

VB.NET

vb.net combobox

VB.Net Populate ComboBox With MySQL

Post A Comment:

0 comments: