将记录集传递给SQL [英] Passing a recordset to SQL

查看:47
本文介绍了将记录集传递给SQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下VB脚本,它通过存储过程将访问记录集输入到SQL表中的第一条记录。


脚本有效,但我想要它输入记录集中的所有记录。为了做到这一点,我添加了3个前缀为***的命令,但是当我运行代码时,它会出错,说明存储过程有太多参数?


任何人都可以帮助我这个?


I have the following VB script which enters the 1st record from aa Access record set into a SQL table via a stored procedure.

The script works a treat but I want it to enter all the records from the record set. To do this I added in the 3 commands which are prefixed with ***, however when I run the code it errors stating that the stored procedure has too many arguments?

Can anyone assist me with this?


展开 | 选择 | Wrap | 行号

推荐答案

第二次循环执行时,参数再次添加,所以第二次执行时有8个参数而不是4个。
The second time the loop executes, the parameters are added again, so the second time the execution has 8 parameters instead of 4.


多亏了这个,但我看不出我需要在脚本中做些什么来改变它work?
Thanks for this, but I can''t see what I need to change in the script to make it work?


我没有用adodb做足够的工作来给你答案,但我认为要么修改现有的参数,要么删除并重新附加
I have not worked enough with adodb to give you the answer, but I presume either modify the existing parameteres, or delete and re-append


这篇关于将记录集传递给SQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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