string sql ="select wavfiled from youtable";
SqlConnection connection = new SqlConnection(connstr);
SqlCommand command = new SqlCommand(sql, connection);
connection.Open();
SqlDataReader dr = command.ExecuteReader();
if(dr.Read())
{
byte[] data= (byte[]) dr["wavfiled"] );
FileStream fs = new FileStream("c:\tempfile.wav",FileMode.Create)
fs.Write(data,0,data.Length);
fs.Close()
}
connection.Close();
}
SqlConnection connection = new SqlConnection(connstr);
SqlCommand command = new SqlCommand(sql, connection);
connection.Open();
SqlDataReader dr = command.ExecuteReader();
if(dr.Read())
{
byte[] data= (byte[]) dr["wavfiled"] );
FileStream fs = new FileStream("c:\tempfile.wav",FileMode.Create)
fs.Write(data,0,data.Length);
fs.Close()
}
connection.Close();
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货