简体   繁体   中英

Passing an array of structures to an Oracle stored procedure (CFMX)

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.

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*CI 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。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM