Subject faster coding method
Author james_027
I have this piece of code in one of my table1 after scroll event,
since table2 could be refresh very often which of my code would be
much faster. or if you have any suggestion which is better than mine.


table2.close;
table2.sql.clear;
table2.sql.add('select * from simulateingredients('+table1.fieldbyname
('itemid').asstring+', '+table1.fieldbyname('qty').asstring+')');
table2.open;


or


table2.parambyname('paramitemid').asinteger:=table1.fieldbyname
('itemid').asinteger;
table2.parambyname('paramqty').asfloat:=table1.fieldbyname
('qty').asfloat;
table2.refresh?


which is more optimize?


or your suggestions????



btw the simulateingredients is a stored procedure .... i use ib_query
for both table1 and table2.


thanks