This tutorial is all about "Load data from MySQl to Datagridview in vb.net".
This tutorial will show you on how to load a specific column data from MySQL database to your combobox element in VB.Net. Combobox is like a text box that can accept all characters but this type of element shows a drop-down type data.
Please use the code below:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Try | |
Str = "select * from fiber_type" | |
conn.Open() | |
Dim da As New MySqlDataAdapter(Str, conn) | |
Dim dt As New DataTable("fiber_type") | |
da.Fill(dt) | |
If dt.Rows.Count > 0 Then | |
cboSignUpFor.DataSource = dt | |
cboSignUpFor.DisplayMember = "description" | |
cboSignUpFor.ValueMember = "" | |
End If | |
conn.Close() | |
Catch ex As Exception | |
MsgBox(ex.Message) | |
conn.Close() | |
End Try |
Generate/View Report using CrystalReport in Vb.Net
Automatically clear text field in VB.Net
Load the data from MySQL to DatagridView VB.Net
0 Comments