S
songjian
Unregistered / Unconfirmed
GUEST, unregistred user!
详细代码如下: 我只知道他是干什么但并不知道TMemoryStream及TBlobField的属性及应用:
begin
TestStream := TMemoryStream.Create;
try
with AQuery do
begin
TBlobField(FieldByName(sFieldName)).SaveToStream(TestStream);
TestStream.Seek(0, soFromBeginning);
TestStream.Read(CurData, SizeOf(CurData));
end;
finally
TestStream.Free;
end;
end;
begin
TestStream := TMemoryStream.Create;
try
with AQuery do
begin
TBlobField(FieldByName(sFieldName)).SaveToStream(TestStream);
TestStream.Seek(0, soFromBeginning);
TestStream.Read(CurData, SizeOf(CurData));
end;
finally
TestStream.Free;
end;
end;