Saving image into MySQL Database is not so difficult, you must set the data type of your image column into “mediumblob”. In your save query code just insert the code below in the above part of your code.
Dim mstream As New System.IO.MemoryStream()
Dim arrImage() As Byte = mstream.GetBuffer()
Remember that the pb_Image is the name of picture box, you can change it depending on your setup. As you notice that we declare the “arrImage()” as Byte so insert that code in the query portion.
Insert the code above after your MySQL Command declaration. After that you must insert the “@Image_Data” into your query, like code below. Remember that “Image_Data” is the name of your image column in your MySQL Table.
‘” & txt_Type.Text & “‘,@Image_Data,'” & txt_InStock.Text & “‘)”