Storing a Recordset in a new query

  • Thread starter Thread starter Anno v. Heimburg
  • Start date Start date
A

Anno v. Heimburg

Hi, NG!

I have the following little challenge: I create an ADO Recordset using a
dynamically generated SQL-Clause. All well and done, but now I would like
to store the result in a new table in the database. Any idea on how I can
do that?

Alternatively, is there any way to store the SQL-Expression as a new Query
in the DB?

Thanks,
Anno.
 
Hi, NG!

I have the following little challenge: I create an ADO Recordset using a
dynamically generated SQL-Clause. All well and done, but now I would like
to store the result in a new table in the database. Any idea on how I can
do that?

Change the SQL so that it's a MakeTable query - create a maketable
query in the grid to get the syntax.

Note that MakeTable queries are inefficient, cause database bloat,
lead to a proliferation of table names, and should generally be
avoided!
Alternatively, is there any way to store the SQL-Expression as a new Query
in the DB?

See the CreateQuerydef method in the online help.
 
John said:
Note that MakeTable queries are inefficient, cause database bloat,
lead to a proliferation of table names, and should generally be
avoided!

Yup. Duely noted. It is rather a hack to easily create memos (the memo-guy
wants a table).
See the CreateQuerydef method in the online help.

I'll try that. Thanks a lot for your help.

Anno.
 
It is rather a hack to easily create memos (the memo-guy
wants a table).

So give him a Query, with a Form (and/or Report) as its visible
expression... and *tell* him it's a table. What users don't know won't
hurt them!
 
Back
Top