I am having trouble with an update statement. When I update the table then run the following code to refresh the combobox with the updated data it still shows the old data. When I close the form then reopen it its ok. The code I am using directly after the update is: -
Dim ds As New DataSet
SQL = "SELECT SupplierID, " & _
"Supplier_Name + ' (' + Supplier_Code + ')' as Supplier_Details " & _
"FROM Suppliers " & _
"ORDER BY Supplier_Name"
Dim da As New SqlClient.SqlDataAdapter(SQL, oConn)
cmbSuppliers.DisplayMember = "Supplier_Details"
cmbSuppliers.ValueMember = "SupplierID"
cmbSuppliers.DataSource = ds.Tables("Suppliers")