access中运行多条更新语句?
在access窗体里编写vba代码可以一次执行多条sql语句
例如:
privatesubcommand1_click()dimsql1asstring,sql2,asstring,sql3asstringsql1="insertintot1(id,name)values('001','zhangsan');"sql2="insertintot1(id,name)values('002','lisi');"sql3="insertintot1(id,name)values('003','wanghwu');"withcurrentproject.connection.executesql1.executesql2.executesql3endwithendsub前提是每条sql语句都是可以被正确执行的
Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有 粤ICP备16019765号
广州京杭网络科技有限公司 版权所有