I've got a strange problem, I have a query that runs fine in database
desktop, but when I try it from a TQuery component, it crashes with the
error "cannot find object".

The query is thus:

select
        count(*) as PointCount
from
        PointAttributes
where
        Point = :Point and
        configurationid =
         (
                select
                        configurationid
                from
                        configuration
                where
                        startdate = (
                                select
                                        MAX(startdate)
                                from
                                        configuration
                                where
                                        startdate <= (
                                                select startdate from
configuration where :ConfigurationID
                                        )
                        )
        )
 
In database desktop I'm replacing the params with values and it works, I'm
assuming I can't use parameters in a subquery/subsubquery?  Is this a bug in
Delphi's TQuery parser that could be added to the wish list?


-- 
Mark Derricutt, He that brings forth electronic life.
Getting jiggy with Front Line Assembly, Bill Leeb, Friends and Company -
Cryogenic Studios


---------------------------------------------------------------------------
  New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to