(Gast)
n/a Beiträge
|
Re: Nur die ersten n Ergebnisse anzeigen
17. Feb 2004, 16:13
ADOQuery:
Delphi-Quellcode:
With Query Do
Begin
SQL.Text :=
' SELECT Kunde,' + #10 +
' Datum' + #10 +
' FROM Kunden' + #10 +
' WHERE RowNum <= :i_LimitRows' + #10 +
' ORDER By Datum';
Prepared := True;
Parameters.ParamByName(' i_LimitRows').Value := n;
Open;
While Not Eof Do
Begin
...
Next;
End;
...
End;
Direct Oracle Access:
Delphi-Quellcode:
With Query Do
Begin
SQL.Text :=
' SELECT Kunde,' + #10 +
' Datum' + #10 +
' FROM Kunden' + #10 +
' WHERE RowNum <= :i_LimitRows' + #10 +
' ORDER By Datum';
DeclareVariable(' i_LimitRows', otInteger);
SetVariable(' i_LimitRows', n);
Execute;
While Not Eof Do
Begin
...
Next;
End;
...
End;
|
|
Zitat
|