很急啊,谢谢。。
解决方案 »
- 请问如何解决这个“system.Console”并不包含“ToDouble”的定义
- C#项目不显示解决方案了,怎样弄出来
- 满足一定要求的排序
- 为什么在线程函数里面构造(new)的窗体(Form)使用会有问题?
- C#问题:检索COM类工厂中CLSID为{E436EBB3-524F-11CE-9F53-0020AF0BA770}的组件时失败,原因是出现以下错误:8007007e。
- c#实现弹出对话框的确定取消
- 请教引用WebService的问题!
- HttpWebRequest怎么处理403下的回应?
- Vs.net2003最近出现一个问题(按F1建,不能够打开msdn)?????
- 嗨!一起进来讨论海量数据处理的问题
- 各位高手,关于安全性的困惑,高分求解,解决马上结贴
- 如何捕捉键盘上输入的Ctrl、Alt、F4等特殊键,是不是用转义字符,是的话转义字符是什么啊!
应该用文件流的方法存入和读取,我是用ASP.NET+SQL Server实现的,估计在oracle中也差不多这个样子,可以到我的blog里看一下
http://dev.csdn.net/develop/article/52/52958.shtm
Response.Clear();
Response.ContentType=type; //文件类型,此类型应该事先获取
Response.AddHeader("Content-Disposition","inline:filename="+reader["Title"].ToString()); //title为文件标题
Response.BinaryWrite((Byte[])reader["Attentment"]);
//attentment为附件内容,也就是image字段的内容
{
HttpContext.Current.Response.AppendHeader("Content-Disposition","attachment;filename="+strFileName+"."+strFileExt);
HttpContext.Current.Response.Charset="GB2312";
HttpContext.Current.Response.ContentEncoding=System.Text.Encoding.Default;
HttpContext.Current.Response.BinaryWrite(bContent);
HttpContext.Current.Response.End();
}
this.reader.Read();
this.Response.ContentType = this.reader["r_type"].ToString();
Response.BinaryWrite((Byte[])reader["r_text"]);
Response.End();
reader.Close();是这样读吗
//显示照片
byte[] MyPicData=new byte[0];
DataTable dTable = this.dsSource1.Tables["MyTable"];
DataRow myRow = dTable.Rows[myPosition];
if(myRow["Photo"] != System.DBNull.Value)
{
MyPicData = (byte[])myRow["Photo"];
int ArraySize = new int();
ArraySize = MyPicData.GetUpperBound(0)+1;
System.IO.MemoryStream ms = new System.IO.MemoryStream(MyPicData);
//通过流对象建立Bitmap
System.Drawing.Bitmap bmp = new Bitmap(ms);
this.picEmp.Image = bmp;
}