Вот такой код:
with Form1.ADOQuery3 do
begin
close;
SQL.Clear;
SQL.Add('Select Index');
SQL.Add('from tPayments');
SQL.Add('Where Date=

Date');
Parameters.ParseSQL(SQL.Text,True);
Prepared:=true;
Parameters.ParamValues['pdate']:=date;
open;
end;
ADOQuery3.Last;
Label1.Caption:=IntToStr(ADOQuery3.FieldByName('In dex').asInteger);
Index1:=StrToInt(Label1.Caption)+6;
//////////////////////////////////////////
with Form4.ADOQuery2 do
begin
Close;
SQL.Clear;
SQL.Add('Select Date, Payments');
SQL.Add('From tPayments');
SQL.Add('Where Index<=

Index');
Parameters.ParseSQL(SQL.Text,True);
Prepared:=true;
Parameters.ParamValues['pIndex']:=Index1;
open;
Так вот в Label'е горит НУЛЬ, а в таблице отображаются совсе не те записи, которые мне нужны. Почему, кто-нить подскажет?