












SqlConnection conn = new SqlConnection("server=.;uid=sa;pwd=123;database=am89resource");
conn.Open();
SqlCommand cmd = new SqlCommand("", conn);
cmd.CommandText = "select * from picture where id='0331010009'";
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
byte[] bytes = (byte[])dr["img"];
FileStream fs = new FileStream(Server.MapPath("//img//1.gif"), FileMode.Create, FileAccess.Write);
fs.Write(bytes, 0, bytes.Length);
fs.Flush();
fs.Close();
}
conn.Close();
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。