i have customer details in my sql database. then i have a textbox, combobox & button. if i type customer name in a textbox i should get his id in combobox. if there is more than one customer with same name that id also should fill in combobox. i need a code for this in vb.net windows application
mails4vijay
0
Newbie Poster
Recommended Answers
Jump to PostHi,
dim con as new DqlConnection
con = new Sqlconnection(constr)
con.open()dim objSqlCommand as new SqlCommand
dim objdr as SqlDataReaderobjSqlCommand = new SqlCommand ("YOUR QUERY")
objdr = objSqlCommand.ExecuteReader()while objdr.Read()
combobox1.Items.add(objdr(0))
end while
Jump to Postidcombo.Items.Add(dr(0))
All 6 Replies
reena12
2
Light Poster
mails4vijay
0
Newbie Poster
reena12
2
Light Poster
mails4vijay
0
Newbie Poster
markd220
4
Newbie Poster
reena12
2
Light 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.