ADOQuery and Blob slowness
From: Scott Elgram (SElgram_at_verifpoint.com)
Date: 10/27/04
- Previous message: wen: "Re: Help:how to write such a SQL string?"
- Next in thread: Del M: "Re: ADOQuery and Blob slowness"
- Reply: Del M: "Re: ADOQuery and Blob slowness"
- Reply: Bill Todd: "Re: ADOQuery and Blob slowness"
- Reply: Brian Bushay TeamB: "Re: ADOQuery and Blob slowness"
- Reply: Scott Elgram: "Re: ADOQuery and Blob slowness"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 27 Oct 2004 10:15:07 -0700
Hello,
I have a process that inserts a record into a database that contains a
BLOB field. Currently I am using the following code to do this;
----------------------Begin Code------------------------
Blob := TFileStream.Create(ImageFile, fmOpenRead);
With ADOQuery2 do
begin
SQL.Text := 'SELECT TOP 1 * FROM [TABLE] ;';
Open;
Insert;
FieldByName('PlanID').Value := PlanID;
FieldByName('ProvID').Value := ProvID;
FieldByName('VerifBy').Value := VerifBy;
FieldByName('VerifDate').Value := VerifDate;
FieldByName('Type').Value := DocType;
(FieldByName('Image') AS TBlobField).loadfromStream(Blob);
FieldByName('PacketIndexID').Value := PktID;
if Derog <> '' then
FieldByName('Derog_type').Value := Derog;
Post;
Close;
end;
Blob.Free;
----------------------End Code------------------------
The project is a rewrite of a VB program and in VB this process seems to
go a lot faster. Can anyone tell me why this seems to go so much slower and
does anyone know a faster way to insert this data?
Thanks,
-- -Scott Elgram
- Previous message: wen: "Re: Help:how to write such a SQL string?"
- Next in thread: Del M: "Re: ADOQuery and Blob slowness"
- Reply: Del M: "Re: ADOQuery and Blob slowness"
- Reply: Bill Todd: "Re: ADOQuery and Blob slowness"
- Reply: Brian Bushay TeamB: "Re: ADOQuery and Blob slowness"
- Reply: Scott Elgram: "Re: ADOQuery and Blob slowness"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|