hey friends, i am new to vb.net so i have a problem to sort out.Can u pls help me.
In my form i have a combobox and textbox,when i select an value from combobox then in the txtbox it has to automatically generate value (from database) corresponding to value selected in combobox.For clear understanding suppose,if i selected an name of the student frm combobox then in the txtbox it has to display the rollno corresponding to tat name...
pls help me.And thanks in advance..
mohana_61
0
Newbie Poster
Recommended Answers
Jump to Postusing select statement and in the where clause mention the criteria as ur combo box....and in ur reader assign the value to the text box....
Try Dim myCommand As SqlCommand myCommand = New SqlCommand("SELECT * FROM tablename where studentname='" & Combobox1.Text & "'", Connection) Dim reader …
All 4 Replies
Pgmer
50
Master Poster
Featured Poster
poojavb
29
Junior Poster
Denden17
-1
Newbie Poster
mohana_61
0
Newbie Poster
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.