Exploiter les données d'un SELECT
Bonjour,
En suivant le guide Plassere-vb.net, j'arrive à remplir ma listbox1 avec le second champ de ma sélection.
Extrait :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
Dim maChaineCn As String = My.Settings.toto
Dim maConnexion As OleDbConnection = New OleDbConnection(maChaineCn)
Dim maCommande As OleDbCommand = maConnexion.CreateCommand()
Dim strsql As String
maCommande.CommandText = "SELECT * FROM PAR_BOUTONS"
maConnexion.Open()
Dim myReader As OleDbDataReader = maCommande.ExecuteReader()
Do While myReader.Read()
'là je souhaiterais exploiter tous les champs de PAR_BOUTONS
ListBox1.Items.Add(myReader.GetString(1))
Loop
myReader.Close()
maConnexion.Close() |
Existe-il un moyen d'utiliser la valeur de tous les champs de mon SELECT pour une utilisation ultérieure ? Quelque chose comme : ???.monchamp1
Merci beaucoup pour votre aide.
JPG