أنا أريد أن أحفظ صورة في SQL SERVEUR +VB net 2005
أنا بستعمل Public datasetperso As New DataSet+Public MyAdaptperso As OleDbDataAdapter
Dim Strliste As String = "select * from PERSONNEL"
MyAdaptperso = New OleDbDataAdapter(Strliste, Con)
MyAdaptperso.Fill(datasetperso, "PERSONNEL")
Dim cmdperso As OleDbCommandBuilder = New OleDbCommandBuilder(MyAdaptperso)
Dim ajoutRow As DataRow
ajoutRow = datasetperso.Tables("PERSONNEL").NewRow
ajoutRow("société") = ComboBox1.Text
ajoutRow("Chantier") = ComboBox7.Text
ajoutRow("Matricule") = TextBox2.Text
ajoutRow("prenom") = TextBox4.Text
ajoutRow("nom") = TextBox3.Text
ajoutRow("nom_complet") = TextBox4.Text & TextBox3.Text
ajoutRow("date_naissance") = DateTimePicker1.Text
ajoutRow("lieu_naissance") = ComboBox2.Text
ajoutRow("Situation_f") = ComboBox3.Text
ajoutRow("adresse") = TextBox6.Text
ajoutRow("ville") = ComboBox4.Text
ajoutRow("qaulification") = ComboBox5.Text
ajoutRow("date_entree") = DateTimePicker2.Text
ajoutRow("date_sortie") = TextBox7.Text
ajoutRow("salire_b") = TextBox8.Text
ajoutRow("deplac_b") = TextBox9.Text
ajoutRow("salaire_actuel") = TextBox14.Text
ajoutRow("deplac_act") = TextBox16.Text
ajoutRow("date_augmen") = TextBox15.Text
ajoutRow("cnss") = TextBox10.Text
ajoutRow("cin") = TextBox11.Text
ajoutRow("valable_du") = DateTimePicker3.Text
ajoutRow("valabl_eau") = DateTimePicker4.Text
ajoutRow("Prime") = TextBox12.Text
ajoutRow("date_prime") = TextBox13.Text
ajoutRow("user2") = myusername
ajoutRow("date_inscription") = Now.Date + Now.TimeOfDay
datasetperso.Tables("PERSONNEL").Rows.Add(ajoutRow )
MyAdaptperso.Update(datasetperso, "PERSONNEL")
'afichage
datasetperso.Clear()
MyAdaptperso.Fill(datasetperso, "PERSONNEL")
DataGridView1.DataSource = datasetperso
DataGridView1.DataMember = "PERSONNEL"
DataGridView1.Refresh()
MsgBox("Enregistrement terminèe avec succes