110,538
社区成员
发帖
与我相关
我的任务
分享
private void GetDBBlob(string strSelectCommandText)
{
DataSet ds = new DataSet();
ds = SelectOracle(strSelectCommandText, "T_ZTWJ");
int rowCount = ds.Tables[0].Rows.Count;
if (rowCount > 0)
{
Byte[] byteBLOBData = new Byte[0];
byteBLOBData = (Byte[])(ds.Tables[0].Rows[0]["WJNR"]);
string fileName = "mydoc.doc";
System.IO.FileStream fs=new System.IO.FileStream(fileName,System.IO.FileMode.Create,System.IO.FileAccess.Write);
System.IO.BinaryWriter bw= new System.IO.BinaryWriter(fs);
bw.Write(byteBLOBData);
bw.Flush();
fs.Flush();
bw.Close();
fs.Close();
}
else
{
//return null;
}
}