hi guys i have a big problem how to insert image to database
i had try this out but it returns error(syntex error)
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
OpenFileDialog1.Title = "GET IMAGE"
OpenFileDialog1.ShowDialog()
End Sub
Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
TextBox1.Text = OpenFileDialog1.FileName
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim con As New OleDb.OleDbConnection
con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\database\mpp eelection1.mdb"
con.Open()
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
sql = "SELECT * FROM maklumatpel"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "record")
con.Close()
Dim cb As New OleDb.OleDbCommandBuilder(da)
ds.Tables("record").Rows(0).Item("image") = TextBox1.Text
da.Update(ds, "record")
MsgBox("PICTURE UPLOADED")
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
PictureBox1.Image = Nothing
End Sub
do anyone can help me
thanks in advance for those helping me
regards -ren-