Subject Works in IBConsole but not IBX??
Author Wayne
Hi All

A Bit off the topic.I have the following query in my app. It was
suggested that AsDate may be a problem and to try AsDateTime, That
didn't work. It was also suggested to set paramcheck to false, that
didn't work either. Please all, I am really stuck and cannot figure
out what I am doing wrong???

Using IBConsole as follows:

CREATE VIEW rota_all
(employee_no, position_employed, shift, on_day, shift_date)
AS
SELECT employee_no, position_employed, shift, on_day, shift_date
FROM rota
UNION ALL
SELECT employee_no, position_employed, shift, on_day, shift_date
FROM rota_history
where shift_date > '07/15/01'

Using IBX as Follows:

StartDate := MonthCalendar1.Date;
ViewQry.SQL.Clear;
ViewQry.SQL.Add('CREATE VIEW rota_all');
ViewQry.SQL.Add('(employee_no, position_employed, shift, on_day,
shift_date)');
ViewQry.SQL.Add('AS');
ViewQry.SQL.Add('SELECT employee_no, position_employed, shift,
on_day,
shift_date');
ViewQry.SQL.Add('FROM rota');
ViewQry.SQL.Add('UNION ALL');
ViewQry.SQL.Add('SELECT employee_no, position_employed, shift,
on_day,
shift_date');
ViewQry.SQL.Add('FROM rota_history');
ViewQry.SQL.Add('where shift_date > :HisDate');
ViewQry.ParamByName('HisDate').AsDate := StartDate - 10;
ViewQry.ExecSQL;
ViewTr.Commit;

In IBConsole it works Fine, but in IBX I get the following error
message

Invalid request BLR at offset 126
Undefined message number

If I remove the Last line
(where Shift_Date > :HisDate)
and the ParambyName('HisDate').AsDate := StartDate - 10;

Then it works fine. My problem is that the history file is growing
all the
time and can become rather large.
What am I doing wrong???

Thanks in advance

Wayne