SqlDataAdapter dataAdapter = new SqlDataAdapter(new SqlCommand("SELECT imageContent FROM PlantLayout WHERE ID='PL001'", con)); DataSet dataSet = new DataSet(); dataAdapter.Fill(dataSet); if (dataSet.Tables["PlantLayout"].Rows.Count>0) { MemoryStream ms = new MemoryStream((byte[])dataSet.Tables["PlantLayout"].Rows[0]["imageContent"]); ms.Position=0; pictureBox1.Image = Image.FromStream(ms);-->error place }
ms.Position = 0;
MemoryStream ms = new MemoryStream((byte[])dataSet.Tables["PlantLayout"].Rows[0]["imageContent"]);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)