SDAC 4.35.0.14 TDALoader.OnPutData and "image"
Posted: Fri 05 Feb 2010 10:05
I successfully use Loader.OnPutData for many tables and datatypes, but I'm currently failing with the "Image" datatype.
for jLoop := 0 to Sender.Columns.Count-1 do
Sender.PutColumnData(jLoop,iCounter,Query.Fields[jLoop].AsVariant);
The above will not fail, but data in an underlying "Image" field will be corrupt. All other fields on the table process as expected. Examining Senser.Columns.Items[jLoop].FieldType I can see that ftBlob is returned, but beyond that I can't proceed.
This is a problem as I'm trying to fully move some old code using OLEDBComponents in to SDAC. In these old components, I handle an image field as follows:
MemoryStream.Clear;
TBlobField(Query.Fields[jLoop]).SaveToStream(MemoryStream);
MemoryStream.Seek(0,soFromBeginning);
biBinding.LoadFromStream(MemoryStream);
Do I need to do something similar with SDAC ?
Thanks,
Paul.
for jLoop := 0 to Sender.Columns.Count-1 do
Sender.PutColumnData(jLoop,iCounter,Query.Fields[jLoop].AsVariant);
The above will not fail, but data in an underlying "Image" field will be corrupt. All other fields on the table process as expected. Examining Senser.Columns.Items[jLoop].FieldType I can see that ftBlob is returned, but beyond that I can't proceed.
This is a problem as I'm trying to fully move some old code using OLEDBComponents in to SDAC. In these old components, I handle an image field as follows:
MemoryStream.Clear;
TBlobField(Query.Fields[jLoop]).SaveToStream(MemoryStream);
MemoryStream.Seek(0,soFromBeginning);
biBinding.LoadFromStream(MemoryStream);
Do I need to do something similar with SDAC ?
Thanks,
Paul.