Public Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim da As New SqlDataAdapter("select * from student where id>3", db.con)
Dim ds As New DataSet
For i As Integer = 0 To ds.Tables("1").Rows.Count - 1
Catch ex As Exception
MsgBox("Error : " + ex.Message)
You will need
Now first define the dataadapter with command string and connection string.
Then fill the dataset using the dataadapter.
After that you can run a loop and add individual data into the combobox.
dim mycon as new sqlconnection("connectionstring")
dim da as new sqldataadapter("select * from table1",mycon)
dim dt as datatable
combobox1.datasource = dt
combobox.displaymember = "field name you want to show "
combobox.valuemember ="field name you want to get as a value "
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...