Thanks Geo. I thought there was a way to avoid the query and all the fuss.
Actually my code is the one following however it does not work with the message "delphi parameter object is improperly defined". Any ideas?
anADOQuery := TADOQuery.Create(Self);
anADOQuery.Connection := DBConnection;
anADOQuery.Parameters.Crea
anADOQuery.Parameters.Para
anADOQuery.SQL.BeginUpdate
try
anADOQuery.SQL.Clear;
anADOQuery.SQL.Add('SELECT
anADOQuery.SQL.Add('FROM [Item Ledger Entry] ');
anADOQuery.SQL.Add('GROUP BY [Item Ledger Entry].[Item No_] ');
anADOQuery.SQL.Add('HAVING
finally
anADOQuery.SQL.EndUpdate;
end;
anADOQuery.Open;
Main Topics
Browse All Topics





by: geobulPosted on 2006-06-24 at 07:56:43ID: 16975428
Hi,
I would go the same way. And the query would be something like:
SELECT Sum(Quantity) FROM 'Item Ledger Entry' WHERE 'Item No' = :Param;
You may add an event handler with the query above in Item table OnScroll or if you're displaying it record by record (not in a grid) in a next/prev button click.
Regards, Geo