从 sql server 2005 blob 检索 Office 2007 文件时出错
我有一个简单的文档存储数据库,允许人们上传各种类型的文档,然后对它们进行全文搜索。
它适用于除 Office 2007 文档之外的所有文档。我的检索代码使用内容类型“application/octet-stream”,服务器与我的计算机一样注册了 MIMETypes。我可以在我的系统上正常打开该文件,但上传然后重新下载会出现错误:
“此错误可能是由以下某些情况引起的:
- 您的硬盘驱动器或软盘驱动器有 损坏的部分(损坏的轨道或 部门)。
- 临时操作系统 或者出现网络故障。
- 你的 网络不可用、缓慢或 损坏数据包(失败 路由器、网卡或噪音 网络传输线)。
如果网络遇到问题,这通常是暂时的情况,如果您等待一小段时间并重试,通常可以保存文件。如果问题仍然存在,请咨询您的网络管理员”
I have a simple document storage database that allows people to upload various types of documents and then do a full-text search on them.
It works just fine for all documents except office 2007 documents. My retrevial code uses content type "application/octet-stream", the server has the MIMETypes registered as does my computer. I can open the file just fine on my system, but uploading it and then redownloading it gives an error:
"This error can be caused by some of the following conditions:
- Your hard drive or floppy drive has a
corrupt section (damaged track or
sector). - A temporary operating system
or network failure has occurred. - Your
network is unavailable, slow, or is
corrupting data packets (failure of a
router, network card, or noise on the
network transmission line).
If the network is experiencing problems, it is usually a temporary condition and if you wait a short period of time and try again, you can usually save the file. If the problem persists, consult your network administrator"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
其他人很难调试这个,但是当我创建 byteStream 时,我使用了 length,而不是 length - 1。出于某种原因,在几乎所有文档中这都没有问题,但 Office 2007 却大为恼火。
It would be tough for others to have debugged this, but when I created a byteStream, I used length, instead of length - 1. For some reason in almost all documents this is no problem, but office 2007 threw a fit.