bonjour j'ai un problème , l'écriture ne se fait pas dans mes tables SQL voici le code :
Dim Connexion As New SqlClient.SqlConnection("Data Source=localhost;Initial Catalog=Service application;User Id=sa;Password=123456789;")
Try
Connexion.Open()
If IService.Text = "Informatiques" Then
Dim Requete As String = "Insert into Informatique(Nom, Prénom, Date, Service, Rue, Département, Ville, Email, Tarif, Description, Téléphone) values (""Nom : " & Nom & "Prénom : " & Prénom & "Date : " & Jour & "Service : " & Service & "Rue : " & Rue & "Département : " & Département & "Ville : " & Ville & "Mail : " & Mail & "Rémunération : " & Rémunération & "Description : " & Description & "Téléphone : " & Téléphone ')
Dim Commande As New SqlCommand(Requete, Connexion)
End If
If IService.Text = "Animaliers" Then
Dim Requete As String = "Insert into Informatique(Nom, Prénom, Date, Service, Rue, Département, Ville, Email, Tarif, Description, Téléphone) values (""Nom : " & Nom & "Prénom : " & Prénom & "Date : " & Jour & "Service : " & Service & "Rue : " & Rue & "Département : " & Département & "Ville : " & Ville & "Mail : " & Mail & "Rémunération : " & Rémunération & "Description : " & Description & "Téléphone : " & Téléphone ')
Dim Commande As New SqlCommand(Requete, Connexion)
End If
If IService.Text = "Espaces Verts" Then
Dim Requete As String = "Insert into Informatique(Nom, Prénom, Date, Service, Rue, Département, Ville, Email, Tarif, Description, Téléphone) values (""Nom : " & Nom & "Prénom : " & Prénom & "Date : " & Jour & "Service : " & Service & "Rue : " & Rue & "Département : " & Département & "Ville : " & Ville & "Mail : " & Mail & "Rémunération : " & Rémunération & "Description : " & Description & "Téléphone : " & Téléphone ')
Dim Commande As New SqlCommand(Requete, Connexion)
End If
If IService.Text = "Baby Sitting" Then
Dim Requete As String = "Insert into Informatique(Nom, Prénom, Date, Service, Rue, Département, Ville, Email, Tarif, Description, Téléphone) values (""Nom : " & Nom & "Prénom : " & Prénom & "Date : " & Jour & "Service : " & Service & "Rue : " & Rue & "Département : " & Département & "Ville : " & Ville & "Mail : " & Mail & "Rémunération : " & Rémunération & "Description : " & Description & "Téléphone : " & Téléphone ')
Dim Commande As New SqlCommand(Requete, Connexion)
End If
If IService.Text = "Déménagements" Then
Dim Requete As String = "Insert into Informatique(Nom, Prénom, Date, Service, Rue, Département, Ville, Email, Tarif, Description, Téléphone) values (""Nom : " & Nom & "Prénom : " & Prénom & "Date : " & Jour & "Service : " & Service & "Rue : " & Rue & "Département : " & Département & "Ville : " & Ville & "Mail : " & Mail & "Rémunération : " & Rémunération & "Description : " & Description & "Téléphone : " & Téléphone ')
Dim Commande As New SqlCommand(Requete, Connexion)
End If
If IService.Text = "Bricolage" Then
Dim Requete As String = "Insert into Informatique(Nom, Prénom, Date, Service, Rue, Département, Ville, Email, Tarif, Description, Téléphone) values (""Nom : " & Nom & "Prénom : " & Prénom & "Date : " & Jour & "Service : " & Service & "Rue : " & Rue & "Département : " & Département & "Ville : " & Ville & "Mail : " & Mail & "Rémunération : " & Rémunération & "Description : " & Description & "Téléphone : " & Téléphone ')
Dim Commande As New SqlCommand(Requete, Connexion)
End If
If IService.Text = "d'aide à la Personne" Then
Dim Requete As String = "Insert into Informatique(Nom, Prénom, Date, Service, Rue, Département, Ville, Email, Tarif, Description, Téléphone) values (""Nom : " & Nom & "Prénom : " & Prénom & "Date : " & Jour & "Service : " & Service & "Rue : " & Rue & "Département : " & Département & "Ville : " & Ville & "Mail : " & Mail & "Rémunération : " & Rémunération & "Description : " & Description & "Téléphone : " & Téléphone ')
Dim Commande As New SqlCommand(Requete, Connexion)
End If
If IService.Text = "Locomotions ou co-voiturage" Then
Dim Requete As String = "Insert into Informatique(Nom, Prénom, Date, Service, Rue, Département, Ville, Email, Tarif, Description, Téléphone) values (""Nom : " & Nom & "Prénom : " & Prénom & "Date : " & Jour & "Service : " & Service & "Rue : " & Rue & "Département : " & Département & "Ville : " & Ville & "Mail : " & Mail & "Rémunération : " & Rémunération & "Description : " & Description & "Téléphone : " & Téléphone ')
Dim Commande As New SqlCommand(Requete, Connexion)
End If
If IService.Text = "D'aide Scolaire" Then
Dim Requete As String = "Insert into Informatique(Nom, Prénom, Date, Service, Rue, Département, Ville, Email, Tarif, Description, Téléphone) values (""Nom : " & Nom & "Prénom : " & Prénom & "Date : " & Jour & "Service : " & Service & "Rue : " & Rue & "Département : " & Département & "Ville : " & Ville & "Mail : " & Mail & "Rémunération : " & Rémunération & "Description : " & Description & "Téléphone : " & Téléphone ')
Dim Commande As New SqlCommand(Requete, Connexion)
End If
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
Connexion.Close()