Page 1 of 1

bug...

Posted: Tue 11 Nov 2008 18:20
by ply
This is sql of my UniQuery

Code: Select all

SELECT 0 as give, (name_last+' '+name_first+' '+name_second) as employee_name,
balance,employee_id, salary_day
FROM employees e
WHERE salary_day>0 AND
(SELECT COUNT(*) FROM wages 
WHERE wage_type='day' AND employee_id=e.employee_id AND monthday=:date )=0
AND (SELECT COUNT(*) FROM schedule WHERE work_type='work' AND CAST([to] as date)=:date)>0
UniQuery doesnt see second ":date" and when I call
uniquery.ParamByName('date').Value:=now;
uniquery.Open;

I see error that I must assign values to all parameters. In TMSQuery all works fine.

Posted: Wed 12 Nov 2008 14:29
by Dimon
To solve this problem you should set the TUniQuery.ParamCheck property to True.