将结构数组传递给 Oracle 存储过程 (CFMX)
我正在编写一个 Oracle 存储过程,在其中我将(从 ColdFusion)传入一个结构数组并循环每次迭代以将结构中的位和片段插入到数据库中。,
我还没有编写过这种类型的之前的程序/包。我计划做一个 sp / 包,类似于此线程的第二个回复中概述的内容: 如何将对象数组传递给 Oracle 存储过程
假设我这样做,我如何从 ColdFusion 调用该过程(我正在使用 MX)并传递我的数组?据我所知,CF_SQL_Types 都没有意义。
I'm looking to write a Oracle stored procedure where I would pass in (from ColdFusion) an array of structures and loop over each iteration to insert the bits and pieces within the structures to the DB.,
I haven't written this type of procedure / package before. I am planning to do an sp / package similar to what is sketched out in the second reply to this thread: How to pass a array of object to oracle stored procedure
Assuming I do, how can I call the procedure from ColdFusion (I'm using MX) and pass in my array? As far as I can see, none of the CF_SQL_Types make sense.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我将任何数据类型的数组传递给 Oracle SP 的唯一方法是使用 OCI 接口和集合。如果有办法直接在 Pro*CI 中做到这一点还没有找到。
OCI 是一个更“详细”的界面。这是基本文档。
http://download-uk。 oracle.com/docs/cd/B14117_01/appdev.101/b10779/oci11oty.htm#421737
The only way I have passed arrays of any data type to an Oracle SP is to use the OCI interface and collections. If there is a way to do it in straight Pro*C I have not found it.
OCI is a more 'verbose' interface. Here is a the base documentation.
http://download-uk.oracle.com/docs/cd/B14117_01/appdev.101/b10779/oci11oty.htm#421737
我建议将数据转换为 XML 并将其传递给 Oracle,而不是使用结构数组。
Instead of an array of structs, I'd recommend just converting the data to XML and passing that to Oracle.