This is the query in the component
Code: Select all
select (:cant * total) as mult from tblsaleCode: Select all
procedure Tfrmprueba.Button5Click(Sender: TObject);
begin
MyQuery1.Close;
MyQuery1.UnPrepare;
MyQuery1.ParamByName('cant').AsInteger := 3;
MyQuery1.Prepare;
MyQuery1.Open;
end;This error is showed just after "MyQuery1.Prepare;" and it can not open the query. I want to know what is the reason for this, I have used the same code in earlier versions (MyDAC 5.2 in Delphi 2006) with no problem.
I solve the problem this way:
Code: Select all
MyQuery1.Close;
MyQuery1.ParamByName('cant').AsInteger := 3;
MyQuery1.ExecSQL;
MyQuery1.Open;
I hope you can help me
Thanks a lot for your time.