Page 1 of 1

Debug window for UniQuery not showing at runtime

Posted: Wed 24 Feb 2010 16:31
by 99Percent
For some inexplicable reason the debug window when opening a Uniquery at runtime does not show despite explicitly setting the property Debug to True and even programmatically UniQuery.Debug:=True;

The debug window shows when activating the query at design time.

The SQL.Text is changed at runtime.

Any pointers in fixing this?

Also the reason I want to debug this query is that it seems to be particularly slow. The query statement is a bit complicated but runs at decent speed when executed directly with the MS SQL Query Analyzer.

FYI the query I want to run is:

Code: Select all

SELECT artClave, artMarca, artDescrip, artPrecio, ISNULL((SELECT exiCant FROM vieExist WHERE exiClave=artClave and exiLugar=1),0) AS artExist, 
      ISNULL((SELECT sum(exiCant) FROM vieExist WHERE exiClave=artClave),0) AS artTotExist 
from tblArts where UPPER(artDescrip) LIKE '%lone%' AND UPPER(artDescrip) LIKE '%20%'
AND UPPER(artDescrip) LIKE '%WOLF%'
if I eliminate the subqueries it runs fine (still no debug window) in Unidac, but when I restore them it slows quite noticeably (2 or 3 seconds) but only with Unidac and only in runtime.

The ReadOnly property is set to True, all other properties to default.

Posted: Thu 25 Feb 2010 13:56
by Dimon
To solve the problem you should add the UniDACVcl unit to the uses clause of the main unit.