Connecting Tech Pros Worldwide Forums | Help | Site Map

add items in combobox at runtime from database(vb.net)

Newbie
 
Join Date: Oct 2008
Posts: 23
#1: Oct 3 '09
in vb 6.0
Dim cnview As New ADODB.connection
Dim rsview As New ADODB.recordset
Call connection(cnview, App.Path & "\aa.mdb", "")
Call recordset(rsview, cnview, "SELECT id FROM emp")
With rsview
While Not .EOF
Item_cmb.AddItem .Fields!agreeitemno
.MoveNext
Wend
End With
Set cnview = Nothing
Set rsview = Nothing

Convert in vb dot net

tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,784
#2: Oct 3 '09

re: add items in combobox at runtime from database(vb.net)


Did you want to ask a question along with your sample code?
Newbie
 
Join Date: Oct 2008
Posts: 23
#3: Oct 5 '09

re: add items in combobox at runtime from database(vb.net)


yes i need source cod to add item in combo box at run time
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,784
#4: Oct 5 '09

re: add items in combobox at runtime from database(vb.net)


myCombo.Items.Add(String NewItem);

The MSDN for ComboBox has good source code examples
Newbie
 
Join Date: Oct 2008
Posts: 23
#5: Oct 6 '09

re: add items in combobox at runtime from database(vb.net)


Thanks
But i want to get data from database
Newbie
 
Join Date: Oct 2009
Posts: 1
#6: Oct 6 '09

re: add items in combobox at runtime from database(vb.net)


hello all,


i am susan here, i ve completed recently .net but i am still confusd about vb .net so any one please let me know about.

keep posting.


cheers!!!!!!!!!!!!!!
Reply