Updating sql database from a listbox
All it does is set up a table from the database and then returns the table.I set the datasource within the same method as the initialize Component (so my listbox will load with the existing data): The Problem: This does not update the listbox.
Find Control("lbox_Construction Type") Dim sel Idxs As Integer() = listbox1.
Command Text = "SELECT CONSTRUCTIONTYPEID FROM [Projects] WHERE [Project ID] = '" & project & "'" Try txtbox = sql. Find Control("lbox_Construction Type") 'Dim txtbox As Text Box = fv Projects.
Close() End Try Dim listbox1 As List Box = fv Projects.
The choices in the listbox are populated by a SQL data table.
I have successfully written code to post the selected listbox values to my SQL data field during Insert.