Any help is much appreciated, guys. I tried using the dataset and other solutions to no avail. The error I keep getting is "Parameter is not valid." My code is this:
try
{
conn.Open();
MySqlCommand comm = new MySqlCommand("SELECT lastname, firstname, picture FROM casestudyprofile WHERE caseid = " + id, conn);
MySqlDataAdapter adp = new MySqlDataAdapter(comm);
DataTable dt = new DataTable();
adp.Fill(dt);
if (dt.Rows.Count > 0)
{
lblname.Text = dt.Rows[0]["firstname"].ToString() + " " + dt.Rows[0]["lastname"].ToString();
pbox2.Image = Image.FromStream(new MemoryStream((byte[])dt.Rows[0]["picture"]));
}
conn.Close();
}