Question : create query in mdb using ADO and A2k

How do I create a query using exclusively ADO, as I would using DAO?
I'd like to create a query and append it to the collection, and be able to edit the underlying query and save to the same stored "querydef".

Answer : create query in mdb using ADO and A2k

just exeute the following sql statement...

create query banana as select * from [MyTable]

this will create the query 'banana'. you can also set up parameters with...

create procedure banana (@MyPar1 varchar) as select * from [MyTable] where [MyField]=@MyPar1

or something similar..

You can do it with the ADO data model also by using the 'command' object. I find the above far more useful though.
Random Solutions  
 
programming4us programming4us