Combo Box items add code vb.net example

In this article, the code to combo box items add is given, which you can use in Inform.

Combo Box items adding code

Try ComboBox1.Items.Clear() ConnectOledb() Dim cmd As New OleDbCommand("SELECT * FROM " & TableName & " ORDER BY ID ", conn) Dim dr As OleDbDataReader = cmd.ExecuteReader While dr.Read ComboBox1.Items.Add(dr.Item(1)) End While dr.Close() DisConnectOledb() Catch ex As Exception System.Media.SystemSounds.Hand.Play() MsgBox("Loading Error : > " & ex.Message) End Try

Leave a Comment