PDA

Click to See Complete Forum and Search --> : Action Query with ADO


scuzymoto
Oct 12th, 1999, 12:35 AM
Im converting a program from DAO to ADO to give it access to more types of databases. I know I can base my recordsource on a SQL statement but I how do I perform Action Queries on my underlying data. Such as... "Delete * from mytable where data = junk" . Sorry if this is a real beginner question. Is their anything comparable to the DAO command database.execute (<statement> )?

Clunietp
Oct 13th, 1999, 12:09 PM
It is only a beginner question if you already know ADO! Convert all to ADO ASAP -- MS Access 2000 can only be accessed via ADO and NOT DAO! I found out the hard way. Anyways....

dim cn as new connection

cn.connectionstring = <yourconnectingstringhere.

'delete everything in table
cn.execute "delete from mytable"
cn.close
set cn = nothing

HTH

Tom