There is combobox and few textboxes.
With the help of insert sqlcommand I can store textboxes values in the database.
But with the same insert sqlcommand I need to store one more combobox selected item too..
How to do this?
Iamateur
0
Junior Poster in Training
Recommended Answers
Jump to PostYou could write a sql statement to instert each one, then place it in a loop.
Example:
Dim conStr As String = "Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;" Dim con As New SqlConnection(conStr) Dim cmd As SqlCommand Try For i = 0 To ComboBox1.Items.Count con.Open() Dim sqls As …
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.