hi,
I am working with windowsapplication,vb.net using datareader object for select query.how can i assign displaymember and value member of combobox of datareader items.
say i have id,desc in table.
strsql = "Select skillid,skilldesc from skillmaster"
mycommand = New SqlCommand(strsql, Conn)
Dim dr As SqlDataReader
'executing the command and assigning it to connection
dr = mycommand.ExecuteReader()
Do While dr.Read
cmbSkillId.Items.Add(dr(1).ToString())
Loop
but how can i give the displaymember and datamember for combo
'displaying the data from the table
dr.Close()
Conn.Close()
Thanks in advance
karuna
I am working with windowsapplication,vb.net using datareader object for select query.how can i assign displaymember and value member of combobox of datareader items.
say i have id,desc in table.
strsql = "Select skillid,skilldesc from skillmaster"
mycommand = New SqlCommand(strsql, Conn)
Dim dr As SqlDataReader
'executing the command and assigning it to connection
dr = mycommand.ExecuteReader()
Do While dr.Read
cmbSkillId.Items.Add(dr(1).ToString())
Loop
but how can i give the displaymember and datamember for combo
'displaying the data from the table
dr.Close()
Conn.Close()
Thanks in advance
karuna