gpt4 book ai didi

sql-server - TAdoDataSet、TAdoStoredProc 多个结果集

转载 作者:行者123 更新时间:2023-12-03 15:30:42 28 4
gpt4 key购买 nike

这些组件能够一次性检索多个结果集(例如,从存储过程),并且使用 D5,我可以成功使用 NextRecordSet 从 Sql Server 获取第二个和后续结果集。

但是,只有当我将光标位置指定为 clClient 时,此方法才有效;如果我使用 clServer,我会收到“不返回多个结果集”错误。这是一个固有的限制(例如,由客户端上的 MDac 层强加的)还是可以从服务器端游标成功检索多个记录集?

最佳答案

这是服务器端游标的固有限制。如下所述MSDN link :

Server cursors cannot be used with statements that generate more than one recordset.

This restriction applies to all statements described in Generating Multiple Recordsets. For more information, see Generating Multiple Recordsets. If a server cursor is used with any statement that generates multiple recordsets, an application can return one of the following errors:

  • Cannot open a cursor on a stored procedure that has anything other than a single SELECT statement in it.
  • sp_cursoropen. The statement parameter can only be a single SELECT statement or stored procedure.

关于sql-server - TAdoDataSet、TAdoStoredProc 多个结果集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18135655/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com