How To Access and Modify SQL Server BLOB Data by Using the ADO Stream Object (258038)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.5
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft OLE DB Provider for SQL Server 7.0
This article was previously published under Q258038 SUMMARY The Stream object introduced in ActiveX Data Objects (ADO) 2.5 can be used
to greatly simplify the code that needs to be written to access and modify
Binary Large Object (BLOB) data in a SQL Server Database. The previous versions
of ADO [ 2.0, 2.1, and 2.1 SP2 ] required careful usage of the GetChunk and AppendChunk methods of the Field Object to read and write BLOB data in fixed-size chunks from and to a
BLOB column. An alternative to this method now exists with the advent of ADO
2.5. This article includes code samples that demonstrate how the Stream object can be used to program the following common tasks:
- Save the data stored in a SQL Server Image column to a file
on the hard disk.
- Move the contents of a .gif file to an Image column in a
SQL Server table.
REFERENCES For additional information, click the following article number
to view the article in the Microsoft Knowledge Base: 308042
How To Read and Write BLOB Data by Using ADO.NET with Visual Basic .NET
Modification Type: | Minor | Last Reviewed: | 7/15/2004 |
---|
Keywords: | kbhowto KB258038 |
---|
|