Subject Re: [IBO] Copy sql from one tib_query to another
Author stanw1950
Sorry, that was sql from a tib_query to a tiboquery. The Assign
almost worked, but the where clauses are not copied (I got all the
data but not the subset I wanted that the tib_query got). The
AssignSQLWithSearch is not a valid method for a tiboquery. Thanks for
the quick reply. Any more ideas?

I am using the tib_query for the screen grid where the user can
restrict what he sees. When he gets the data he wants, he clicks a
button and a report is printed. The report query is a tiboquery (for
quickreport) and needs the same sql. (Ibo 4.2gc, Delphi 6). TIA.

Stan Walker

--- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
> Try doing a MyQuery.SQL.Assign( AnotherQuery.SQL )
> Another way for a little different result is to use the
> MyQuery.AssignSQLWithSearch( AnotherQuery ) method.
> Jason Wharton
> CPS - Mesa AZ
> ----- Original Message -----
> From: "stanw1950" <stanw@e...>
> To: <IBObjects@y...>
> Sent: Wednesday, May 01, 2002 2:42 PM
> Subject: [IBO] Copy sql from one tib_query to another
> > What's the best way to assign all the sql (the select, from,
> > and ordering) from one tib_query to another tib_query? Thanks in
> > advance.
> >
> > Stan Walker
> >