简体   繁体   English

从数据库中提取文件

[英]Extracting files from a database

Does anyone know of a query, script or way of how I can extract actual files, example a jpeg, msg, or xls file, etc. from a database? 有谁知道查询,脚本或如何从数据库中提取实际文件(例如jpeg,msg或xls文件等)的方式? Basically, the files are not saved on a physical drive. 基本上,文件不会保存在物理驱动器上。 They are stored within the database. 它们存储在数据库中。 How can I export/extract them from the database? 如何从数据库导出/提取它们?

Using SQL Server 2008 R2. 使用SQL Server 2008 R2。

Does your SQL server have Binary Large OBjects (BLOBs) types? 您的SQL Server是否具有二进制大对象(BLOB)类型? BLOBs were made so that you could store and extract files such as these. 制作BLOB是为了使您可以存储和提取诸如此类的文件。

Take a look at this Blob description . 看看这个Blob描述 You can use the InputStream to read your Excel file into Apache POI-HSSF , for instance. 例如,您可以使用InputStream将Excel文件读入Apache POI-HSSF

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM