CONNEXION
  • RetourJeux
    • Sorties
    • Hit Parade
    • Les + populaires
    • Les + attendus
    • Soluces
    • Tous les Jeux
    • Gaming
  • RetourActu Gaming
    • News
    • Astuces
    • Tests
    • Previews
    • Toute l'actu gaming
  • RetourBons plans
    • Bons plans
    • Bons plans Smartphone
    • Bons plans Hardware
    • Bons plans Image et Son
    • Bons plans Amazon
    • Bons plans Cdiscount
    • Bons plans Decathlon
    • Bons plans Fnac
    • Tous les Bons plans
  • RetourJVTech
    • Actus High-Tech
    • Intelligence Artificielle
    • Smartphones
    • Mobilité urbaine
    • Hardware
    • Image et son
    • Tutoriels
    • Tests produits High-Tech
    • Guides d'achat High-Tech
    • JVTech
  • RetourCulture
    • Actus Culture
    • Culture
  • RetourVidéos
    • A la une
    • Gaming Live
    • Vidéos Tests
    • Vidéos Previews
    • Gameplay
    • Trailers
    • Chroniques
    • Replay Web TV
    • Toutes les vidéos
  • RetourForums
    • Hardware PC
    • PS5
    • Switch 2
    • Xbox Series
    • Switch
    • Pokemon pocket
    • FC 25 Ultimate Team
    • League of Legends
    • Tous les Forums
  • PC
  • PS5
  • Xbox Series
  • Switch 2
  • PS4
  • One
  • Switch
  • iOS
  • Android
  • MMO
  • RPG
  • FPS
En ce moment Genshin Impact Valhalla Breath of the wild Animal Crossing GTA 5 Red dead 2
Liste des sujets

(Visual basic] problème connection SQL

breakdown92hd
breakdown92hd
Niveau 4
06 mai 2013 à 20:19:30

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()

Sous forums
  • Aide à l'achat Mac
  • Macintosh
  • Création de sites web
  • Création de Jeux
  • Linux
  • Programmation
  • Internet
  • Steam Deck
  • Hardware
La vidéo du moment