i have a combobox i want to show all the student name in it , i am using mssql database , and when we select student a textbox will show the rollno of that student , please help me
thehunk
5
Newbie Poster
Recommended Answers
Jump to Posthello !
try this code , hope this will solve your prob.Sub values() Dim con As New SqlConnection("connectionstring") con.Open() Dim da As New SqlDataAdapter("select name , idno from students", con) Dim dt As New DataTable da.Fill(dt) ComboBox1.DataSource = dt ComboBox1.DisplayMember = "name" ComboBox1.ValueMember = "idno" End …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.