将图像列保存到SQL Server 2000中的文件

问题描述:

我在SQL Server 2000中有一个带有图像列的表。我需要将图像数据保存到文件系统上的文件中。在SQL Server 2005中,我可以将ADODB.Stream对象用于文件I / O,但这似乎不存在于SQL Server 2000中。我能找到的最接近的是Scripting.FileSystemObject,但它似乎只支持文本文件这对我不起作用(我不认为)。

I have a table with an image column in SQL Server 2000. I need to save the image data to a file on the file system. In SQL Server 2005 I can use the ADODB.Stream object for file I/O but this doesn't seem to exist in SQL Server 2000. The closest thing I can find is Scripting.FileSystemObject but it only seems to have support for text files which won't work for me (I don't think).

ADODB.Stream不是SQL组件,是与MDAC / WDAC一起分发的ADO组件。所以只需在SQL 2000机器上安装最新的 MDAC / WDAC 即可你可以随意使用ADODB.Stream。

ADODB.Stream is not a SQL component, is an ADO component distributed with MDAC/WDAC. So simply install latest MDAC/WDAC on the SQL 2000 machine and you'll have ADODB.Stream at your disposal to use.