我想将filesystemobject保存到sql server [英] I want to save filesystemobject to sql server

查看:89
本文介绍了我想将filesystemobject保存到sql server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我们正在使用BLOB保存文件,但现在想将文件系统对象保存到sql server。

你能提供一些帮助!

解决方案

您可以真正解决此类问题(存储文件以供日后检索)以下两种方式之一:



1. store数据库中的链接(更容易预先,但你需要一个存储实际数据的地方)



2.将blob存储在数据库中(更复杂)前面,更容易迁移)



因为你提到将FSO存储到BLOB中 - 我假设你已经选择了#2选项。



FILESTREAM - http:// technet .microsoft.com / zh-CN / library / bb933993%28v = sql.105%29.aspx [ ^ ] - 允许您将文件流入和流出MS S QL数据库 - 但您必须拥有MSSQL 2008或更高版本并调整SQL服务器以处理该功能(即你的DBA可能必须启用它等。)



另一种方式在我的文章中突出显示:

从/从SQL Server数据库上载和下载文件 [ ^ ] - 涉及将数据流入和传出varbinary字段类型。



希望这会有所帮助!

Hi,
We are using BLOB to save files but now want to save filesystemobject to sql server.
Can you provide some help!

解决方案

You can really approach this type of problem (storing files for later retrieval) one of two ways:

1. store a link in the database (easier up front, but you need a place to store the actual data)

2. store the blob right in the database (more complex up front, easier for migrations)

Since you mention storing a FSO into a BLOB - I assume you've settled on option #2.

FILESTREAM - http://technet.microsoft.com/en-us/library/bb933993%28v=sql.105%29.aspx[^] - allows you to stream files into and out of a MS SQL database - but you have to have MSSQL 2008 or above and adjust the SQL server to handle that functionality (i.e. your DBA may have to enable it, etc.).

Another way is highlighted in my article here:
Uploading and downloading files to/from a SQL Server database[^] - which involves streaming data in and out of varbinary field types.

Hope this helps!


这篇关于我想将filesystemobject保存到sql server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆