Subject | Re: [IBO] Faster Datapump from FoxPro/Paradox to Firebird |
---|---|
Author | H.Klomann |
Post date | 2002-02-28T13:14:23Z |
Enrico,
try this:
procedure TForm1.Button1Click(Sender: TObject);
begin
Table1.Open;
Table1.First;
IB_DSQL1.SQL.Clear;
IB_DSQL1.SQL.Add('insert into T (FIRST_NAME,LAST_NAME) values (:FIRST_NAME,:LAST_NAME)');
IB_DSQL1.Prepare;
IB_DSQL1.BeginBusy(FALSE);
while not Table1.Eof do begin
Table1.Next;
IB_DSQL1.ParamByName('FIRST_NAME').AsString := Table1.FieldByName('LAST_NAME').AsString;
IB_DSQL1.ParamByName('LAST_NAME').AsString := Table1.FieldByName('LAST_NAME').AsString;
IB_DSQL1.ExecSQL;
end;
IB_DSQL1.EndBusy;
IB_Transaction1.Commit;
end;
This should perform very quick !
Harald
Enrico Raviglione schrieb:
try this:
procedure TForm1.Button1Click(Sender: TObject);
begin
Table1.Open;
Table1.First;
IB_DSQL1.SQL.Clear;
IB_DSQL1.SQL.Add('insert into T (FIRST_NAME,LAST_NAME) values (:FIRST_NAME,:LAST_NAME)');
IB_DSQL1.Prepare;
IB_DSQL1.BeginBusy(FALSE);
while not Table1.Eof do begin
Table1.Next;
IB_DSQL1.ParamByName('FIRST_NAME').AsString := Table1.FieldByName('LAST_NAME').AsString;
IB_DSQL1.ParamByName('LAST_NAME').AsString := Table1.FieldByName('LAST_NAME').AsString;
IB_DSQL1.ExecSQL;
end;
IB_DSQL1.EndBusy;
IB_Transaction1.Commit;
end;
This should perform very quick !
Harald
Enrico Raviglione schrieb:
>
> Hi to all,
> i must import into a new Firebird DB all the old data stored into a FoxPro
> or Paradox table.
> I have a procedure with a TIB_Cursor and a TTable for make this and all work
> fine but the process are very slow, an example:
> for a table of only 630 record and 15 columns an Athlon 700Mhz in cpLocal
> connection work about 2 minutes!!
>
> Can i accelerate the process?
>
> I must import some large table (about 200MB) for every installation and at
> this speed it's very frustrating...
>
> Regards,
> Enrico Raviglione
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/