Public Const PassWord = "monmotdepasse", Server_Name = "mon_serveur", User_ID = "mon_utilisateur", Database_Name = "ma_base"
Public Const Connexion= "Driver={MySQL ODBC 3.51 Driver};Server=" & Server_Name & ";Database=" & Database_Name & ";Uid=" & User_ID & ";Pwd=" & PassWord & ";"
Function model_to_id(la_cellule1 As String) As interger
With CreateObject("ADODB.Recordset")
.Open "select products_id from products where products_model='" & la_cellule1 & "'", Connexion, 1, 3
If Not .EOF Then model_to_id = .Fields(0)
.Close
End With
End Function