Posted on 2007-08-07
i have the following code: -
sql = "SELECT * FROM Where_Used where ProductID ='" & cmbProducts.SelectedValue.ToString & "'"
Dim da4 As New SqlClient.SqlDataAdapter(sql, oConn)
da4.Fill(ds, "Where_Used") ' populate data set "da" with the data returned from sql command "ds" and set dataset name to "Rigs"
lstRigs.DisplayMember = "RigID"
lstRigs.ValueMember = "DeptID"
lstRigs.DataSource = ds.Tables("Where_Used")
It wont allow me to clear the listbox I presume because its bound to a datatable. I'm trying to find out how I clear it please.