VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

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

Pete Sral  (6 Submissions)   Databases/Data Access/DAO/ADO   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

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 (10(10 Vote))

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

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

    No comments yet — be the first to post one!

    Post a Comment

    0/1000 characters