tags:

views:

414

answers:

1

I'm trying to execute a statement like:

UPDATE table1 SET name="Joe" WHERE id='1'; UPDATE table2 SET name="Bob" WHERE id='2'

But, when executing the query, I get:

Microsoft JET Database Engine error '80040e14' Characters found after end of SQL statement.

It works when I execute the statements separately, though.

So I'm guessing there's absolutely no way to execute multiple queries in a single SQL statement when using Microsoft Access/JET database engine?

+2  A: 

No, there is no way to do this except through VBA or such like, when the statements can be Executed seperately, but as a single procedure.

Remou
I'm basically trying to do (in ASP) conn.Execute("query1; query2; query3"), but the only possible way I can do this is conn.Execute("query1"), conn.Execute("query2"), conn.Execute("query3")?
Yes, one by one is the only way.
Remou