Hello I'm trying to populate a ListBox using a DataSet in VB .MET
I have 3 TextBoxes (ID, LastName and FirstName) and a ListBox
Using the DataSet method I can fill the new table with Id, last name and first name...
but the LidtBox still empty...!
Try
objDataAdapter.SelectCommand = New OleDb.OleDbCommand(MySQL, objConn)
'Fill the table (Cartes)
objDataAdapter.Fill(objDataSet, "Cards")
'Close the connection to the DataBase
objConn.Close()
'Binding the TextBoxes with Data
TextBoxNom.DataBindings.Add("Text", objDataSet, "Cartes.EmpNom")
TextBoxPrenom.DataBindings.Add("Text", objDataSet, "Cartes.EmpPrénom")
ListBox.DataBindings.Add("Text", objDataSet, "Cartes.EmployésCartesNom")
Catch
exceptionObject As Exception
MsgBox(exceptionObject.Message)
End Try
Thankyou
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).