unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,
DB, FIBDataSet, pFIBDataSet, FIBDatabase, pFIBDatabase,
FIBQuery, pFIBQuery, pFIBStoredProc;
type
TForm1 =
class(TForm)
Database: TpFIBDatabase;
Transaction: TpFIBTransaction;
Test1DS: TpFIBDataSet;
Test2DS: TpFIBDataSet;
Button1: TButton;
Memo1: TMemo;
TestSP: TpFIBStoredProc;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var i : integer;
begin
i := 0;
Test1DS.close;
Test1DS.SelectSQL.Text := '
SELECT * FROM TEST1';
Test1DS.Open;
while not Test1DS.Eof
do begin
i := i + 1;
TestSP.ParamByName('
Feld1').AsString := Test1DS.FieldByName ('
Feld1').AsString;
TestSP.ParamByName('
Feld2').AsString := Test1DS.FieldByName ('
Feld2').AsString;
TestSP.ParamByName('
Fled3').AsString := Test1DS.FieldByName ('
Fled3').AsString;
TestSP.ParamByName('
Feld4').AsString := Test1DS.FieldByName ('
Feld4').AsString;
TestSP.ParamByName('
Feld5').AsString := Test1DS.FieldByName ('
Feld5').AsString;
TestSP.ParamByName('
Fled6').AsString := Test1DS.FieldByName ('
Fled6').AsString;
TestSP.ExecProc;
Memo1.Lines.Add(IntToStr (i));
Test1DS.Next;
end;
Transaction.Commit;
Database.Close;
showmessage ('
fertig !');
Close;
end;
end.