如何使用 VBSCRIPT 从包含临时表中的值的存储过程访问数据?

发布于 2024-08-31 16:02:55 字数 454 浏览 7 评论 0原文

出于测试目的,我编写了一个 VBscript,它将通过执行包含临时表中的值的存储过程来从 Sybase 获取值。当我运行脚本时,我收到以下错误,

"Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record."

或者

"Item cannot be found in the collection corresponding to the requested name or ordinal."

当我在谷歌搜索时我发现,当我们在存储过程中使用临时表时,将显示上述错误消息,如果这是原因,那么我如何通过访问数据VBscript通过执行存储过程?? 我正在使用 QTP 运行 VBScript

for testing purpose I wrote a VBscript which will fetch values from Sybase by executing a stored procedure which contains values in temp table. When I run the script I get the following errors ,

"Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record."

or

"Item cannot be found in the collection corresponding to the requested name or ordinal."

Somewhere when I was googling I found that , the above error message will be shown when we use temp table in stored procedure, if that is the reason , then how can I access data via VBscript by executing the stored procedure ??
I am using QTP to run VBScript

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

葬シ愛 2024-09-07 16:02:55

我也不了解 Sybase,但听起来您返回的记录集要么具有与您期望的不同的字段名称,要么甚至不存在。

我假设您正在插入临时表,然后最终从中选择以返回值。
如果 sybase 支持,请在存储过程的开头使用 Set NOCOUNT On。

您可能会取回多个记录集,而第一个记录集不是您想要的。

I don't know Sybase as well but it sounds like the recordset you return either has field names different than what you are expecting OR its not even there.

I assume you are inserting into the temp table and then eventually selecting from it to return the values.
If sybase supports it, use a Set NOCOUNT On at the beginning of your stored proc.

You likely are getting multiple recordsets back and the first one isn't the one you want.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文