将数组从.Net应用程序传递到Oracle存储过程 [英] Passing an array from .Net application to Oracle stored procedure

查看:58
本文介绍了将数组从.Net应用程序传递到Oracle存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将数组从C#.net应用程序传递到oracle存储过程. 有人可以让我知道如何去做吗? 另外,在将输入参数传递给存储过程时,我应该在C#中使用哪种OracleType类型?

I need to pass an array from C#.net application to oracle stored procedure. Can anyone please let me know how to go about it? Also, which OracleType type do I use in C# when passing input parameter to stored procedure?

仅供参考,我在C#应用程序中正在使用System.Data.OracleClient.

FYI, am using System.Data.OracleClient in my C# app.

谢谢.

推荐答案

Jimmy, System.Data.OracleClient不支持数组.
http://social.msdn .microsoft.com/Forums/zh-CN/adodotnetentityframework/thread/57a59fba-09e2-46cb-a072-6706b3ec5131

Jimmy, the System.Data.OracleClient does not support arrays.
http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/57a59fba-09e2-46cb-a072-6706b3ec5131

根据您的需要,您将需要使用ODP.net客户端通过嵌套表类型(通过UDT或assoc.数组)实现此目的.特别是,这可能是一个不错的选择.由于.net 4.0具有不推荐使用的系统.Data.OracleClient .

Depending on your need, you will either need to implement this via nested table types (via UDTs or assoc. arrays) using the ODP.net clients. This is probably a good direction to go, esp. since .net 4.0 has deprecated System.Data.OracleClient.

但是,如果您被System.Data.OracleClient所困扰,并且您实际上只是在尝试在列表中执行变量,则可以通过传递字符串并遵循以下一些建议来做到这一点: http://asktom.oracle. com/pls/asktom/f?p = 100:11:0 ::::: P11_QUESTION_ID:210612357425

But if you are stuck with the System.Data.OracleClient and you are really just trying to do a variable in-list, you can do this by passing in a string and following some of these suggestions: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:210612357425

希望这会有所帮助

这篇关于将数组从.Net应用程序传递到Oracle存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆