Hi
You can use Streams to read the blob field.Here is some text from C++Builder Help:
TBlobField::SaveToStream
Saves the contents of the BLOB field to a stream.
void __fastcall SaveToStream(Classes::TStream* Stream);
Description
Use SaveToStream to copy the contents of a BLOB field to a stream. Specify the name of the stream to which the field’s value is saved as the value of the Stream parameter.
Note: The Stream parameter is typically not a BLOB stream. BLOB streams (returned by the dataset’s CreateBlobStream method) provide a completely separate mechanism for streaming data from a BLOB field.
TMemoryStream *pMS = new TMemoryStream;
try
{
SQLDataSet1Images->SaveToStream(pMS);
Image1->Picture->Bitmap->LoadFromStream(pMS);
}
__finally
{
delete pMS;
}
TBlobField::LoadFromStream
Loads BLOB data from a stream into the field.
void __fastcall LoadFromStream(Classes::TStream* Stream);
Description
Use LoadFromStream to copy the contents of a stream into the BLOB field. Specify the stream from which the field’s value is copied as the value of the Stream parameter.
Note: The Stream parameter is typically not a BLOB stream. BLOB streams (returned by the dataset’s CreateBlobStream method) provide a completely separate mechanism for streaming data into a BLOB field.
if ((ClientDataSet1->State != dsInsert) &&
(ClientDataSet1->State != dsEdit))
ClientDataSet1->Insert();
TMemoryStream *pMS = new TMemoryStream;
try
{
Image1->Picture->Bitmap->SaveToStream(pMS);
ClientDataSet1Images->LoadFromStream(pMS);
}
__finally
{
delete pMS;
}
ClientDataSet1->Post();