U Ujjwalvb New member Joined Feb 24, 2006 Messages 2 Programming Experience Beginner Mar 1, 2006 #1 Hello Any body tell me how to add the items in the checked list box From the Database. Ujjwal
kulrom Well-known member Joined May 10, 2005 Messages 2,854 Location Republic of Macedonia Programming Experience 10+ Mar 1, 2006 #2 same as all other list controls (listbox, listView, comboBox ...) possible solution: VB.NET: conn.Open() strSQL = "SELECT anItem FROM myTable" {...} cmd.ExecuteReader [COLOR=blue]While[/COLOR] objread.read [SIZE=2][COLOR=#0000ff] Me[/COLOR][/SIZE][SIZE=2].CheckedListBox1.Items.Add(objread("anItem")) [/SIZE][COLOR=blue]End While[/COLOR] HTH Regards Upvote 0 Downvote
same as all other list controls (listbox, listView, comboBox ...) possible solution: VB.NET: conn.Open() strSQL = "SELECT anItem FROM myTable" {...} cmd.ExecuteReader [COLOR=blue]While[/COLOR] objread.read [SIZE=2][COLOR=#0000ff] Me[/COLOR][/SIZE][SIZE=2].CheckedListBox1.Items.Add(objread("anItem")) [/SIZE][COLOR=blue]End While[/COLOR] HTH Regards