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
}
***this is the code for display image but unsuccess.and display message "parameter is not valid"...Can someone tell me how to solve this problem? thanks.