SQLite query issue
Posted: Tue 28 May 2013 15:47
Hello,
I'm attempting to query an sqlite database with the sqlite provider and keep getting zero records returned for the table in question. I've tracked the problem down via lovely trial & error AGAIN and have determined that the named field in the sql statement is causing the issue.
Here's a code snippet from the sql statement:
CASE WHEN QUOTE_ID IN (SELECT PARENT_QID FROM QUOTES WHERE PARENT_QID IS NOT NULL) THEN ''Yes'''
WHEN QUOTE_ID NOT IN (SELECT PARENT_QID FROM QUOTES WHERE PARENT_QID IS NOT NULL) THEN ''No'''
END AS HAS_CHILD
The TUniQuery used for this query has the HAS_CHILD field entered into the fields editor, TStringField, fieldKind = fkData, size=3. If I remove HAS_CHILD from the fields editor then the query works but I no longer have access to the HAS_CHILD field which is NOT a valid workaround. The exact same code works correctly with MSSQL 2005 using the ODBC provider. Please confirm this is a bug in unidac.
Terry
I'm attempting to query an sqlite database with the sqlite provider and keep getting zero records returned for the table in question. I've tracked the problem down via lovely trial & error AGAIN and have determined that the named field in the sql statement is causing the issue.
Here's a code snippet from the sql statement:
CASE WHEN QUOTE_ID IN (SELECT PARENT_QID FROM QUOTES WHERE PARENT_QID IS NOT NULL) THEN ''Yes'''
WHEN QUOTE_ID NOT IN (SELECT PARENT_QID FROM QUOTES WHERE PARENT_QID IS NOT NULL) THEN ''No'''
END AS HAS_CHILD
The TUniQuery used for this query has the HAS_CHILD field entered into the fields editor, TStringField, fieldKind = fkData, size=3. If I remove HAS_CHILD from the fields editor then the query works but I no longer have access to the HAS_CHILD field which is NOT a valid workaround. The exact same code works correctly with MSSQL 2005 using the ODBC provider. Please confirm this is a bug in unidac.
Terry