hey guys need a little help.
i tried to save image into my database, it saves without error
but when i tried to check if it saves in mysql, the data about my picture id save, but the image i save return a value of 0.
please help me with this.

here's my code...
myconn = New MySqlConnection(cons)
mycom = New MySqlCommand
mycom = New MySqlCommand("insert into tblpic values('" & PicID.Text & "','" & PictureBox1.Dock & "')", myconn)
MsgBox("Record SAVED")

Catch ex As Exception
MessageBox.Show(ex.Message, "Database Failure!", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try


thanks in advance.(",)

Please use code tags when posting code on daniweb:

[code=vb.net] ...code here...


You can't very well insert a picture boxes .Dock state in to the database. You need to use parameters and a byte array. Do a quick google search on "parameterized SQL" and that should get you pointed in the right direction.