Subject Newbie question about data-transfer
Author Filippo
Hi,
I'm trying to port our applications from IBX (6.03) to IBObjects (I
use Firebird 1.0.2.908-Win32, Delphi 6 Enterprise).
One of these is an applications that copies data from different
versions of our database (we cannot use datapump directly).
After the porting toward IBObjects, this program works but has became
slower than the original.
In particular, there seems to be a slower execution of the following
procedure, that we use to transfer one record from the source database
to the destination database.

// ORIGINAL VERSION (IBX)
procedure TDMInit.CopyParameters(Source: TIBQuery; Destination:
TIBStoredProc);
var
I : Integer;
begin
with Destination do
for I := 0 to ParamCount - 1 do
if Params[I].ParamType = ptInput then
begin
Params[I].Clear;
if (Source.FindField(Params[I].Name) <> nil) then // If the
destination table has some new field we must ignore it
Params[I].Assign(Source.FieldByName(Params[I].Name));
end;
end;


// NEW VERSION (IBObjects)
procedure TDMInit.CopyParameters(Source: TIB_Cursor; Destination:
TIB_StoredProc);
var
I : Integer;
begin
with Destination do
begin
Params.BeginUpdate;
try
Params.ClearBuffers(rsNone);
for I := 0 to ParamCount - 1 do
begin
if Source.FindField(Params[I].FieldName) <> nil then

Destination.Params[I].Assign(Source.FieldByName(Params[I].FieldName));
end;
finally
Params.EndUpdate(True);
end;
end;
end;

Can someone please tell me if there is a faster way to pass fields
values from a source query to a destination stored procedure?
Thanks

Filippo