sqlCon.Open(); string sqlSelectQuery = "SELECT * FROM MNDBagShellTb WHERE BsRefNo = @BsRefNo"; using (SqlCommand cmd = new SqlCommand(sqlSelectQuery, sqlCon)) { cmd.Parameters.AddWithValue("@BsRefNo", (txtRef.Text)); using (SqlDataReader dr = cmd.ExecuteReader()) { if (dr.Read()) { //stockDetails imageBytes = dr["SbsImage"] as byte[]; if (imageBytes != null) { using (var stream = new MemoryStream(imageBytes)) pbxBagImg.Image = Image.FromStream(stream); } } } } sqlCon.Close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)