[VB] avec une requete SQL la mettre dans une TextBox
Bonjour,
Je souhaiterais pouvoir modifier une donner dans ma base. Donc quand mon utilisateur ta l' id de se qu'il souhaite modifier j'ai:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| Dim conn As New MySqlConnection
Dim myCommand As New MySqlCommand
Dim myAdapter As New MySqlDataAdapter
Dim myData As New DataTable
Dim SQL As String
SQL = "SELECT prenom,nom,entreprise_client FROM formation WHERE ID= '" & val1 & "' "
conn.ConnectionString = myConnString
Try
conn.Open()
Try
myCommand.Connection = conn
myCommand.CommandText = Sql
myAdapter.SelectCommand = myCommand
myAdapter.Fill(myData)
' mes textbox
Vprenom = prenom.Text
Vnom = nom.Text
Ventreprise = entreprise.Text |
donc quand je clique pour faire ma recherche je voudrait que les valeur qui sont dans prenom, nom, entrprise_client se retrouve dans leur textbox correspondante.
Merci,