Re: Unprepare an TADOQuery?



Am 26 Sep 2005 02:57:14 -0700 schrieb Guillem:

Hi,

> if i understood you right, you are using ExecSQL to return a SELECT
> statement. That's not a good idea. For any query that returns a cursor
> you should use Open instead

No. The Query reads records from a temporary table, joins them with other
tables and writes them into a new temporary table. It is an SELECT .. INTO
Query. This is Informix-syntax and it works like an Insert-Statement
including a creation of a temptable. So there is no cursor and so I have to
use ExecSQL.
Anyway the problem is, that Delphi doesn't unprepare _any_ TADOQueries. And
because I do drop and recreate the temp. tables the following ExecSQL
doesn't work, because the query is still prepared for the old table-id,
which isn't present anymore.
The workaround #3635 on QC allows me to unprepare the queries manually and
so my problem is solved.

Thanks for the answer,
Daniel
.



Relevant Pages