This is a post from the Delphi newsgroup that went unanswered. Maybe someone here can shed some light on this issue.
I am using Delphi6 with Direct Oracle Access components in a 3tier
project. I have some data that has been stored into a database blob
field. I want to create a file on the local hard drive that contains
the data that was stored in the blob field. I have provided a sample of
the code below, however, my problem is that the created file is only 32k
in size. The original file that this data comes from is 48k. I know
that the data is stored correctly via some other tests that I have
done. I am using a TClientdataset to create the stream on the client
side and the TOracleDataset in the muddle tier. The blob size seems to
be set at 32768 which limits the real output of my file to that amount
of data.
try
BlobData := tmpCDS.CreateBlobStream(
tmpCDS.FieldByName('RPTTEMPLATE'), bmRead ) ;
rptSaveFile := TFileStream.Create('C:\' +
tmpCDS.FieldByName('rptname').asString, fmCreate );
rptSaveFile.CopyFrom( BlobData, BlobData.Size );
finally
BlobData.Free ;
FreeAndNil(rptSaveFile) ;
end;
I am using Delphi6 with Direct Oracle Access components in a 3tier
project. I have some data that has been stored into a database blob
field. I want to create a file on the local hard drive that contains
the data that was stored in the blob field. I have provided a sample of
the code below, however, my problem is that the created file is only 32k
in size. The original file that this data comes from is 48k. I know
that the data is stored correctly via some other tests that I have
done. I am using a TClientdataset to create the stream on the client
side and the TOracleDataset in the muddle tier. The blob size seems to
be set at 32768 which limits the real output of my file to that amount
of data.
try
BlobData := tmpCDS.CreateBlobStream(
tmpCDS.FieldByName('RPTTEMPLATE'), bmRead ) ;
rptSaveFile := TFileStream.Create('C:\' +
tmpCDS.FieldByName('rptname').asString, fmCreate );
rptSaveFile.CopyFrom( BlobData, BlobData.Size );
finally
BlobData.Free ;
FreeAndNil(rptSaveFile) ;
end;