SQL Union access violation

Quote
Rob Rietow wrote:
> > It has to to with including conditional statements in the sql.  When I
> > include the following selection criteria  in both sections of the union, I
> > get the error.  If I comment it out of the 'union' section, runs OK.
> > However, I need the selection criteria in both sections.

> >         if gsRecord.gsSalesman <> '' then
> >         begin
> >           sql.add('and customer.salesman = :sqlSalesman');
> >           parambyname('sqlSalesman').asString := gsRecord.gsSalesman;
> >         end;

As far as I know, you can not use params for UNION statements - at least
for Paradox. I do not know the reason for this restriction.

Regards,
Marco