hi. how can i save image file in mySQL from vb.net?
my vb.net program picture
the image i want to save in mySQL database is already in the picture box
mySQL table
and this is my SQL tables now how can i add the image in the picture box to mySQL

"Insert into brgyemployee (PICTURE) values ('"PictureBox1.Image"')"

dont work :(

note: brgyemployee is the name of my table where "PICTURE" column is located

or atleast to fix this code

Imports MySql.Data.MySqlClient
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim con As New MySqlConnection()
        Dim cmd As New MySqlCommand
        Dim adptr As New MySqlDataAdapter
        Dim table As Image
        con.ConnectionString = "SERVER=localhost;UID=root;PWD=israel;DATABASE=testing"
        adptr = New MySqlDataAdapter("SELECT PICTURE FROM brgyemployee WHERE Fname= '" & TextBox1.Text & "'", con)
        [U]adptr.Fill(table)[/U]
        Dim i As Integer
        PictureBox1.Image = [U]PictureBox1.Image & ""[/U] & [U]table.Rows[/U](i)("PICTURE")
    End Sub
End Class

underlined codes gives me errors, this one is for loading the image from database in
PictureBox1.Image

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.