Page 1 of 1

Some UniQuery SQL not working in 5.2.5

Posted: Fri 24 Jan 2014 10:22
by a.alekizoglou
For some reason in 5.2.5 some queries are not working as they did in previous version. For example the following SQL returns nothing when I execute it giving a parameter that exists in my DB. When I create the UniQuery on my form, the same query with the parameter works fine.

Code: Select all

  dtsErrorMessage := TUniQuery.Create(nil);
  dtsErrorMessage.Name := 'dtsMSGEngineMessages';
  dtsErrorMessage.SQL.Clear;
  dtsErrorMessage.SQL.Add('SELECT *                                     ');
  dtsErrorMessage.SQL.Add('FROM                                         ');
  dtsErrorMessage.SQL.Add('(SELECT strErrorID,                          ');
  dtsErrorMessage.SQL.Add('       strTitle,                             ');
  dtsErrorMessage.SQL.Add('       strDescription                        ');
  dtsErrorMessage.SQL.Add('FROM errorscustom                            ');
  dtsErrorMessage.SQL.Add('WHERE strErrorID  = :strErrorCode            ');
  dtsErrorMessage.SQL.Add('                                             ');
  dtsErrorMessage.SQL.Add('UNION                                        ');
  dtsErrorMessage.SQL.Add('                                             ');
  dtsErrorMessage.SQL.Add('SELECT strErrorID,                           ');
  dtsErrorMessage.SQL.Add('       strTitle,                             ');
  dtsErrorMessage.SQL.Add('       strDescription                        ');
  dtsErrorMessage.SQL.Add('FROM errors                                  ');
  dtsErrorMessage.SQL.Add('WHERE strErrorID  = :strErrorCode            ');
  dtsErrorMessage.SQL.Add(') AS errors                                  ');
  dtsErrorMessage.SQL.Add('GROUP BY strErrorID                          ');

  dtsErrorMessage.ParamByName('strErrorCode').AsString := 'F_QUES_BUY_CONNECTED_DEL';
  dtsErrorMessage.Execute;


Re: Some UniQuery SQL not working in 5.2.5

Posted: Fri 24 Jan 2014 10:37
by AlexP
Hello,

Please specify the databases you are working with

Re: Some UniQuery SQL not working in 5.2.5

Posted: Fri 24 Jan 2014 11:37
by a.alekizoglou
Opps, sorry, MySQL 5.6.10

Re: Some UniQuery SQL not working in 5.2.5

Posted: Fri 24 Jan 2014 12:52
by AlexP
We have reproduced the problems, and will try to fix them as soon as possible