未知数量的光标

发布于 2024-09-10 09:42:17 字数 183 浏览 1 评论 0原文

使用 ODP.net,我在 10g 上调用多个存储过程。其中一个过程返回一个游标。另一个返回 3,另一个返回 11,等等。有没有办法容纳未知数量的游标。现在我只是添加另一种特定于需求的方法,但这似乎是一种浪费。

我正在考虑存储每个过程所需的游标数量,例如在 XML 文件中并循环和添加,但这似乎很笨拙

有人有任何想法吗?

Using ODP.net, I am calling several stored procedures on 10g. One of the procedures returns one cursor. Another returns three, and yet another returns 11, etc. Is there a way to accommodate an unknown number of cursors. Right now I just add another method that is specific to the need, but this seems like a waste.

I was thinking about storing the number of cursors needed for each procedure, say in an XML file and looping through and adding, but this seems clunkish

Anyone have any ideas?

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

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

发布评论

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

评论(1

梦归所梦 2024-09-17 09:42:17

Odp OracleDataAdapter 包含一个重载函数Fill,支持表数组作为参数。

public int Fill(int startRecord, int maxRecords, params DataTable[] dataTables)

然后您可以从许多结果中加载许多表。

您还可以使用 OracleDataReader.NextResult 来迭代每个结果。

Odp OracleDataAdapter includes a overload Function Fill that supports Tables array as parameter.

public int Fill(int startRecord, int maxRecords, params DataTable[] dataTables)

Then you can load many tables from many results.

You can use also OracleDataReader.NextResult to iterate each Result.

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