MyDAC 7.6.11 for delphi xe2 problems
Posted: Fri 18 Jan 2013 23:11
I have a problem in a TMYQUERY component when I try to use parameters, here is an example:
This is the query in the component
and here the code in delphi xe2:
I get the error Program.exe raised exception class EAssertionFailed whit message 'Float Len = 6 (..\MyClasses.pas, line 6252)'
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:
But I want to know what's wrong in "MyQuery1.Prepare;" maybe is just a bug...
I hope you can help me
Thanks a lot for your time.
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.