MyDAC 7.6.11 for delphi xe2 problems

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
oceres
Posts: 1
Joined: Fri 18 Jan 2013 20:52

MyDAC 7.6.11 for delphi xe2 problems

Post by oceres » 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

Code: Select all

select (:cant * total) as mult from tblsale
and here the code in delphi xe2:

Code: Select all

procedure Tfrmprueba.Button5Click(Sender: TObject);
begin
  MyQuery1.Close;
  MyQuery1.UnPrepare;
  MyQuery1.ParamByName('cant').AsInteger := 3;
  MyQuery1.Prepare;
  MyQuery1.Open;
end;
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:

Code: Select all

  MyQuery1.Close;
  MyQuery1.ParamByName('cant').AsInteger := 3;
  MyQuery1.ExecSQL;
  MyQuery1.Open;
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.

AndreyZ

Re: MyDAC 7.6.11 for delphi xe2 problems

Post by AndreyZ » Mon 21 Jan 2013 09:48

Hello,

Please specify the following:
- the script to create the tblsale table;
- the exact version of MySQL server and client. You can learn it from the Info sheet of TMyConnection Editor.

Post Reply