![]() |
| 编程社区 » C#编程 » C#怎样访问Access数据库中的OLE对象类型-----急,请高手帮忙 |
C#怎样访问Access数据库中的OLE对象类型-----急,请高手帮忙 |
flyingdream123 |
发表:
|
1.有很多上传文件的文章,可去查查
2.上传时保存文件类型,打开时根据类型不同调用不同的程序.
gz
这是相关一段代码,
SqlDataReader dBContent = documents.GetDocumentContent(documentId);
while(dBContent.Read())
{
// Serve up the file by name
Response.AppendHeader("content-disposition","filename=" + HttpUtility.UrlEncode((String)dBContent["FileName"]));
// set the content type for the Response to that of the
// document to display. For example. "application/msword"
Response.ContentType = (String) dBContent["ContentType"];
// output the actual document contents to the response output stream
Response.OutputStream.Write((byte[]) dBContent["Content"], 0, (int) dBContent["ContentSize"]);
// end the response
Response.End();
break;
}
dBContent.Close();
学习
顶!
是在winFORM里面,而不是WEB.那位高人帮帮忙,快急死了
up
学习
你创建一个流 把OLE对像通过二进至流读到内存中 然后再通过流写成文件或别的之类的就看你自己了
Web用Access放视频?考虑一下Access的承载能力吧!
还有,WebForm和WinForm操作数据库是一样的,zhzuo(秋枫) 的代码可以参考。
同时,客户端的文件关联肯定不会是相同的,比如JPG,有人用Windows的图片浏览工具关联,有人是Acdsee,还甚至有PS关联过去的。你如何判定客户端的打开方式呢?
最后往往会变成下载链接了
Studying
可能大家没有明白我的意思,其实我是想用C#实现Access里面操作OLE对象的功能.
顶一个!我也在找处理办法(winform).如何绑定显示access ole中存放的word文档。
希望哪位大侠给点指导
高手都跑那里去了?
up
ding
再顶
uo
| 编程社区 2008 浙ICP备09013498号 |
| © TinyBBS.cn |
| 编程好站连接:codeproject sf.net codeplex |