1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Dim Commande_SQL_Code_article As New MySqlCommand("SELECT ARTICLE FROM article WHERE (CODE_2=@Code_secondaire);", Connection_SQL)
Dim Adapter_SQL As New MySql.Data.MySqlClient.MySqlDataAdapter
Dim Data_SQL As MySql.Data.MySqlClient.MySqlDataReader
Connection_SQL.ConnectionString = "chaine_de_connexion"
Connection_SQL.Open()
Commande_SQL_Code_article.Parameters.AddWithValue("@Code_secondaire", Code_secondaire)
Adapter_SQL.SelectCommand = Commande_SQL_Code_article
Data_SQL = Commande_SQL_Code_article.ExecuteReader()
Data_SQL.Read()
'MsgBox("Code secondaire : " & Code_secondaire & Chr(10) & "Retour requete : " & Data_SQL.GetString("ARTICLE") & Chr(10) & "Nombre : " & Data_SQL.GetString("ARTICLE").Count)
MsgBox(Commande_SQL_Code_article.)
If ? Then
Code_article = Data_SQL.GetString("ARTICLE")
Else
GoTo Suivant
End If
Data_SQL.Close()
Commande_SQL_Code_article.Parameters.Clear() |