Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试执行如下语句:
UPDATE table1 SET name="Joe" WHERE id='1'; UPDATE table2 SET name="Bob" WHERE id='2'
但是,在执行查询时,我得到:
Microsoft JET 数据库引擎错误 '80040e14' 在 SQL 语句结束后发现字符。
不过,当我单独执行语句时它会起作用。
所以我猜在使用 Microsoft Access/JET 数据库引擎时,绝对没有办法在单个 SQL 语句中执行多个查询?
不,没有办法做到这一点,除非通过 VBA 或类似的方式,当语句可以单独执行时,但作为单个过程。
可能最简单的方法是创建存储过程并在您的代码中执行它。用exec命令。