I am creating a System with tile buttons, User will add image to SQL database and when he load a form that image will load in a Picture box, I made a code to add an image to pictuew an image to picturebox and i waned to add them in to database with a button click event for that I code something like this.
string mySQL = "INSERT INTO Reservation VALUES ("
+ Convert.ToInt32(textBox_TileNo.Text.Trim()) + ", '"
+ textBoxItemCde.Text.Trim() + "','"
+ textBoxItemNme.Text.Trim() +
+ pictureBox.Image () + "')";
DBConnection database = new DBConnection();
int rslt = database.insertValues(mySQL);
if (rslt > 0)
{
MessageBox.Show("added");
}
else
{
MessageBox.Show("Error wile adding data");
}
this is giving me an error in this line + pictureBox.Image () + "')";
under .image i know this wont work, can anybody suggest me the correct way or Woking code like this