我图片type 有 7000行 可是 我写的读出来只有50行 你帮我看看 哪里 不对
[C#] 纯文本查看 复制代码 byte[] imagebytes = null;
SqlConnection conn = new SqlConnection(conn_kai);
conn.Open();
string sql = string.Format("select * from StuDent where SDName='刘艳'");
SqlCommand comm = new SqlCommand(sql, conn);
SqlDataReader mydr = comm.ExecuteReader();
while (mydr.Read())
{
imagebytes = (byte[])mydr.GetValue(12);
byte[] imageData = (byte[])mydr[12];
}
mydr.Close();
conn.Close();
MemoryStream ms = new MemoryStream(imagebytes);
Bitmap bmpt = new Bitmap(Bitmap.FromStream(ms));
pictureBox1.Image = bmpt; |