VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Access and Modify SQL Server BLOB Data by Using the ADO Stream Object

by Pete Sral (6 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (9 Votes)

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.



    ** Article ID: Q258038 - I take no credit for the code, I simply created a project from the example in the article **

    Rate Access and Modify SQL Server BLOB Data by Using the ADO Stream Object

    Download Access and Modify SQL Server BLOB Data by Using the ADO Stream Object

    Download Access and Modify SQL Server BLOB Data by Using the ADO Stream Object (34 KB)

  • Access and Modify SQL Server BLOB Data by Using the ADO Stream Object Comments

    No comments have been posted about Access and Modify SQL Server BLOB Data by Using the ADO Stream Object. Why not be the first to post a comment about Access and Modify SQL Server BLOB Data by Using the ADO Stream Object.

    Post your comment

    Subject:
    Message:
    0/1000 characters