0

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 &"')

Edited by Reverend Jim: fixed formatting

2
Contributors
1
Reply
15
Views
5 Years
Discussion Span
Last Post by Begginnerdev
0

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)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.