1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Sub SetSalarie(ByVal Nom As String, ByVal Prenom As String, ByVal TypeSal As String, ByVal Titreemprunt As String)
NomSalarie = Nom
PrenomSalarie = Prenom
StatutSal = TypeSal
TitreLivre = Titreemprunt
If StatutSal = "cadre" Then
StatutSal = 1
Else
StatutSal = 2
End If
'requete = "Insert into employe (NumEmp,NomEmp,PrenomEmp,NumStatEmp) values (7,NomSalarie,PrenomSalarie,StatutSal )"
requete = "INSERT INTO employe(NumEmp, NomEmp,PrenomEmp,NumStatEmp) VALUES(" + NomSalarie + "," + PrenomSalarie + "," + StatutSal + ")"
'requete = "Insert into employe (NumEmp,NomEmp,PrenomEmp,NumStatEmp) values (7,'" & NomSalarie & "', '" & PrenomSalarie & "', '" & StatutSal & "')"
conn.ExecuterRequete(requete)
End Sub |
Partager