Search Tools Links Login

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


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 **

    Original Author: Pete Sral

  • About this post

    Posted: 2002-06-01
    By: ArchiveBot
    Viewed: 101 times

    Categories

    Visual Basic 6

    Attachments

    CODE_UPLOAD99669182000.zip
    Posted: 9/3/2020 3:45:00 PM
    Size: 35,413 bytes


    Loading Comments ...

    Comments

    No comments have been added for this post.

    You must be logged in to make a comment.