Page 1 of 1

Problems in SDAC components version 7

Posted: Wed 10 Dec 2014 09:36
by m.deltoso
Dear Devart,

after upgrading your components to version 7 i get some errors with a particular type of query using UNION ALL operator.

I have reproduced the errors with 2 queries on the AdventuresWork2014 database.

1) "TableName cannot be empty" assertion (Unit MSClasses.pas line 1979-1980 in function TMSSQLRecordSet.FieldListDependsOnParams: boolean;) is fired when trying to open this simple query:

Code: Select all

SELECT
  *
FROM
  HumanResources.Department E

UNION ALL

SELECT
  -1,
  'No dept',
  '',
  NULL

ORDER BY 1
The problem seems to be due to the third field in the second select ('' - empty string). If I replace the empty string with a blank string ' ' the query opens correctly.

2) Application freezes (infinite loop in function TMSSQLRecordSet.FieldListDependsOnParams: boolean; MSClasses.pas) when trying to open this query:

Code: Select all

SELECT
  E.DepartmentID,
  E.Name,
  E.GroupName,
  E.ModifiedDate,
  ISNULL('(' + E.GroupName + ')' + ' ', '') + ISNULL(E.Name, '[NO DEPT]') AS CompleteName
FROM
  HumanResources.Department E
WHERE
  E.DepartmentID <= 10

UNION ALL

SELECT
  E.DepartmentID,
  E.Name,
  E.GroupName,
  E.ModifiedDate,
  ISNULL('(' + E.GroupName + ') ', '') + ISNULL(E.Name, '[NO DEPT]') AS CompleteName
FROM
  HumanResources.Department E
WHERE
  E.DepartmentID > 10

ORDER BY 1
In this case the error seems to be linked to the last field of the second select because if i remove the blank character after the closing bracket (')' instead of ') ') the query opens correctly.

I need a quick update because we use a lot of query of this type in our application and i cannot search for all of them to correct.

Thanks in advance.

Re: Problems in SDAC components version 7

Posted: Thu 11 Dec 2014 10:26
by azyk
We have already fixed these 2 described problems. These fixes will be included into the next SDAC build. The next SDAC build will be released within 1 month.

Re: Problems in SDAC components version 7

Posted: Fri 13 Feb 2015 14:33
by sofetch
Hi, was it fixed already? I have SDAC version 7.0.2 for delphi XE7. And I got error TableName cannot be empty on TMSQuery. The query is read only, updatingtable is empty.

The query is not intended to be updated anyway. Contains some joins union and everything is wrapped up with upper level query.

Re: Problems in SDAC components version 7

Posted: Mon 23 Feb 2015 13:42
by azyk
We have already fixed this problem. This fix will be included in the next SDAC build.