R
rgp1581
Unregistered / Unconfirmed
GUEST, unregistred user!
if not adoqNetOpen.FieldByName('METAGE_WAGON_PICTURE').IsNull then
begin
Stream := TMemoryStream.Create;
try TBlobField(adoqNetOpen.FieldByName('METAGE_WAGON_PICTURE')).SaveToStream(Stream);
Stream.Seek(0, 0);
adoqLocUpdate.SQL.Text := ' insert into WAGON_PICTURE '+ ' (METAGE_ID,METAGE_WAGON_PICTURE') valuesMETAGE_ID,:METAGE_WAGON_PIC)';
adoqLocUpdate.Parameters.ParamByName('METAGE_ID').Value := adoqNetOpen.FieldByName('METAGE_ID').AsString;
adoqLocUpdate.Parameters.ParamByName('METAGE_WAGON_PICTURE').LoadFromStream(Stream, ftBlob);
adoqLocUpdate.ExecSQL;
finally Stream.Free;
end;
end;
问题:seek()用法,参数表示是什么意思! 还有 LoadFromStream(Stream, ftBlob);
begin
Stream := TMemoryStream.Create;
try TBlobField(adoqNetOpen.FieldByName('METAGE_WAGON_PICTURE')).SaveToStream(Stream);
Stream.Seek(0, 0);
adoqLocUpdate.SQL.Text := ' insert into WAGON_PICTURE '+ ' (METAGE_ID,METAGE_WAGON_PICTURE') valuesMETAGE_ID,:METAGE_WAGON_PIC)';
adoqLocUpdate.Parameters.ParamByName('METAGE_ID').Value := adoqNetOpen.FieldByName('METAGE_ID').AsString;
adoqLocUpdate.Parameters.ParamByName('METAGE_WAGON_PICTURE').LoadFromStream(Stream, ftBlob);
adoqLocUpdate.ExecSQL;
finally Stream.Free;
end;
end;
问题:seek()用法,参数表示是什么意思! 还有 LoadFromStream(Stream, ftBlob);