The main issue is that vb net does not pass \ sign into my sql for saving so just trick it to replace the single "\" with double "\" this will eliminate only one "\" while saving e.g
the text box will display d:\images\image1.jpeg
but mysql table will save it as d:\images\images1.jpeg
thus while retrieving it will be very easy.
use this

dim pics as string
dim kol as string

OpenFileDialog1.ShowDialog()
pics = OpenFileDialog1.FileName
PictureBox1.ImageLocation = pics

kol = OpenFileDialog1.FileName.Replace("\", "\\")

TextBox1.Text = kol

JUST INSERT OR UPDATE IN mysql TABLE IN THE NORMAL WAY

SQL = "INSERT IMAGER (NAME,IMAGE) VALUES ('"& TEXTBOX2.TEXT&"','"& TEXTBOX1.TEXT &"')

One problem that may occur is if D: is mapped to a network drive and the database is being used by some one else. (D: might not be the same drive for them)

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.