Problems in SDAC components version 7
Posted: Wed 10 Dec 2014 09:36
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:
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:
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.
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
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
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.