Use TDataSet.CreateBlobStream to get a TBlobStream for a TBlobField; then you can use the methods of streams to transfer information as you need.  The help on CreateBlobStream and TBlobStream has examples.
 
Cheers,
Carl
 
-----Original Message-----
From: Colin R Dillicar [mailto:[EMAIL PROTECTED]]
Sent: Sunday, 4 June 2000 12:47 PM
To: Multiple recipients of list delphi
Subject: Re: [DUG]: Streaming Data to/from BLOBs

Hi, I need some help,
 
I am having difficulty passing information between a BLOB field in a database and an array in memory and would appreciate it if someone familiar with the process would provide me with some sample code.
 
The array I have is "Program Data", as follows :-
 
type
       DataLocations  = record
          Data  : array[1..6] of byte;         { Can I define the array as byte or should I pack two bytes into integers ?}
      end;
 
var
      ProgramData  :  array 1..200 of DataLocations;
 
 
  When accessing any record in the database I need to get the data in its Blob field into Program Data, maybe modify it, then
put it back when done with the record.
 
  I believe I have to first Create then later Destroy the buffer, but don't really understand how this is done. I imagine it's pretty simple but its got me beat.
 
 
TIA
 
     Colin
 
 

Reply via email to