Presque Tu as oublier d'enlever un '. Bon je le fait.
Aussi tu ne dois pas accepter une réponse ton que tu as un problème. Car là tout le monde crois qu'il n'y a plus besoin de venir lire ta question vu que tu as cliqué sur résolu.
Donc v essayer de t'aider mais il faudra surement que tu ré ouvre une diction
Imports System.Data.SqlClient
Import System.Data.sql
Module Modadmin
Private con As SqlConnection = New SqlConnection("Data Source=.\SQLEXPRESS;baseSMS.mdf;Integrated Security=True;User Instance=True")
Private cmd As sqlCommand
Private cmd1 As sqlCommand
Private cmd2 As sqlCommand
Private cmd3 As sqlCommand
Private cmd4 As sqlCommand
Private adapt As SqlDataAdapter
Private adapt1 As SqlDataAdapter
Private adapt2 As SqlDataAdapter
Private adapt3 As SqlDataAdapter
Private dts As DataSet
Private dts1 As DataSet
Private dts2 As DataSet
Private dts3 As DataSet
Private tab2 As DataTable
Public Sub ajoutres(ByVal id As Integer, ByVal nom As String, ByVal prenom As String, ByVal dep As String, ByVal numtel As Integer)
Try
con.Open()
cmd = New SqlCommand()
cmd.CommandText = "Insert Into utilisateur_responsable values (id,nom,prenom,dep,numtel)"
cmd.Connection = con
cmd.ExecuteReader()
MessageBox.Show("L'ajout se fait avec succée")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Public Sub modif_res()
Try
cmd2 = New SqlCommand()
cmd2.CommandText = "Update utilisateur_responsable set ()"
cmd2.Connection = con
cmd2.ExecuteReader()
MessageBox.Show("La Modification se fait avec succée")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Public Sub supp_res()
Try
cmd3 = New SqlCommand()
cmd3.CommandText = "Delete utilisateur_responsable set ()"
cmd3.Connection = con
cmd3.ExecuteReader()
MessageBox.Show("La Suppression se fait avec succée")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub