multiple SQL statements in Access

sdkramer

Registered User.
Local time
Today, 16:43
Joined
Mar 19, 2002
Messages
64
Is there anyway to chain together my queries?

eg, make table blah blah blah;
update table blah blah blah;
update table blah blah blah;
update table blah blah blah;
update table blah blah blah;
alter table blah blah blah;
 
You mean to make them into one single query? Or to have them execute one after the other?
 
Either works. I'd like to put them in a single query, but I suppose I could chain them one after another. I've put together a VBA module with a docmd.setwarnings false and openquery qry1, etc, but I don't the compiler keeps telling me I need to put it inside a procedure. What's up with that.
 
Easiest way is to chain them. Not all queries can be combined with one another. I'd suggest using the Currentdb.Execute method (if you're using Access 97 and DAO) and CurrentProject.Connection.Execute method (if you're using Access 2000+ and ADO0. They will get rid of those warning message automatically.
 
I usually use a macro to do it.
 
Macros are a poor choice in a database that is used by anyone other than yourself since they have no error handling ability.
 
MYSQL Dump

Has anyone been able to import a mysql dump file? I just need to be able to run the multiple SQL statements automatically.
 

Users who are viewing this thread

Back
Top Bottom