I need to save pictures in my database, my database is MSSQL
as of now, my code for getting the picture is this:
Private Sub browsepic_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles browsepic.Click
With dialogpic 'Open File Dialog sa toolbox
.InitialDirectory = "C:\Users\CAMILLE\Pictures"
.Filter = "JPG Files|*.jpg|PNG Files|*.png|GIF Files|*.gif"
.FilterIndex = 2
End With
If dialogpic.ShowDialog() = DialogResult.OK Then
With studentpic
.Image = Image.FromFile(dialogpic.FileName)
.SizeMode = PictureBoxSizeMode.StretchImage
.BorderStyle = BorderStyle.Fixed3D
End With
End If
End Sub
Can you help me on how to save the picture and how to retrieve it?