I am trying to store an image path in my mysql database but it does not store the backslash(/).
this is my path - string str = @"C:\Users\user\Downloads\99 Most Amazing Collection of Computer Desktop Wallpapers - 5522 [ECLiPSE]"
this is how it appears in mysql - C:UsersuserDownloads99 Most Amazing Collection of Computer Desktop Wallpapers - 5522 [ECLiPSE]
Because of this i am unable to retrive the image, so how do i store the imagepath with the backslash included.
Mysql Code
string sqlstring = "server=; port= ; user id =;Password=;Database=;";
string str = @"C:\Users\user\Downloads\99 Most Amazing Collection of
Computer Desktop Wallpapers - 5522 [ECLiPSE]"
MySqlConnection conn = new MySqlConnection(sqlstring);
try
{
conn.Open();
}
catch (MySqlException ex)
{
throw ex;
}
string Query = "INSERT INTO test.blogimagestable (ImagesId)values('" + str + "');";
MySqlCommand cmd = new MySqlCommand(Query, conn);
cmd.ExecuteReader();
conn.Close();