几个同时插入MS Access中的sql语句 [英] Several Insert Into sql statements in MS Access at same time

查看:69
本文介绍了几个同时插入MS Access中的sql语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我尝试同时在直接MS访问中运行几个插入sql语句。例如,


INSERT INTO Mytable(F1,F2)VALUES(''V11'',''V12'')

INSERT INTO Mytable(F1 ,F2)VALUES(''V21'',''V22'')

INSERT INTO Mytable(F1,F2)VALUES(''V31'',''V32'')

INSERT INTO Mytable(F1,F2)VALUES(''V41'',''V42'')


我该怎么办?任何提示?

似乎MS Access编辑器不支持同时运行的几个INSERT INTO语句。对吗?


提前致谢。


- Loi -

Hi,

I try to run several insert into sql statements in direct MS access at same time. For ex.

INSERT INTO Mytable(F1, F2) VALUES(''V11'', ''V12'')
INSERT INTO Mytable(F1, F2) VALUES(''V21'', ''V22'')
INSERT INTO Mytable(F1, F2) VALUES(''V31'', ''V32'')
INSERT INTO Mytable(F1, F2) VALUES(''V41'', ''V42'')

How can I do it? Any hints?

It seems that MS Access editor does not support several INSERT INTO statements running at the same time. Right?

Thanks in advance.

- Loi -

推荐答案

是的


这是非常棒的!


但是你可以将SQL传递给运行它们的函数

如:


Docmd.RunSql" ; SQL


一个接一个
Yeah

It''s thrut!

However you can pass a SQLs to a function that runs them
like:

Docmd.RunSql "SQL"

one after other


如果您在连接/ querydef的Execute方法的帮助下查找,您应该找到对
If you look up under help for the Execute method from a connection / querydef, you should find reference to
dbRunAsync 异步执行查询(仅限ODBCDirect Connection和QueryDef对象)。



您必须管理确定代码何时完成。

帮助解释相当充分。

You will have to manage determinating when they''re all complete in your code.
The help explains it fairly fully.



如果你从连接/ querydef查找Execute方法的帮助,你应该找到


的引用你必须管理确定它们何时''在你的代码中完成所有内容。

帮助解释得相当充分。
If you look up under help for the Execute method from a connection / querydef, you should find reference to

You will have to manage determinating when they''re all complete in your code.
The help explains it fairly fully.



如果后端数据库与使用db.Execute的Access不同,可能会执行多个操作...


但是不同的数据库......不是Jet!

Yeap maybe if the backend database is different from Access using db.Execute can execute multiple actions...

But different database... Not the Jet!


这篇关于几个同时插入MS Access中的sql语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆