使用 ODP.Net 在 Oracle 表中插入记录数组

发布于 2024-09-11 19:25:05 字数 166 浏览 0 评论 0原文

我可能懒于搜索这个,但我不知道如何使用 C# 和 ODP.Net 将记录数组插入到 Oracle 表中。我见过插入基本类型的基本示例,但从未发现任何类似记录数组的示例。有什么帮助吗?

我基本上需要一个记录类型,该类型在表中包含五列中的三列。然后我需要使用 C# 和 ODP.Net 将一组值插入到表中。

I might be lazy to search this, but I have no idea how to insert an array of records in to an Oracle table using C# and ODP.Net. I have seen basic examples with inserting primitive types but never found any with something like array of records. Any help?

I basically need to have a record type which would have three out of five columns in a table. Then I need to insert an array of values into the table using C# and ODP.Net.

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

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

发布评论

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

评论(1

听风吹 2024-09-18 19:25:05

有几种方法可以做到这一点,您可以创建一个用户定义类型(udt)和该类型的集合并插入它,或者您可以传入 assoc。数组(如果愿意的话,每列一个数组)来执行插入。我已经回答了

有关 udt 插入的 类似问题
将 oracle 查询转换为用户定义的类型pl/sql

用于关联。数组插入:
http://forums.oracle.com/forums/thread.jspa ?messageID=4370850�

但一个好的待遇是您已经安装了一些示例
%ORA_HOME%\odp.net\samples\2.x\UDT

(还有 assoc.array 和其他 odp 类型的其他示例)

让我知道这是否有帮助

there are a few ways to do it, you can create a User Defined Type (udt) and a collection of that type and insert it, or you can pass in assoc. arrays (an array per column if you will) to do the insert. I have answered similar questions

for the udt insert
Converting oracle query into user defined types in pl/sql

for the assoc. array insert:
http://forums.oracle.com/forums/thread.jspa?messageID=4370850�

but a nice treat is you already have some examples installed
%ORA_HOME%\odp.net\samples\2.x\UDT

(there are other examples for the assoc. array and other odp type things)

let me know if this helps

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