标题:C#中OracleType用什么类型能把数组作为参数传给存储过程
只看楼主
wwpewr
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2006-4-18
 问题点数:0 回复次数:0 
C#中OracleType用什么类型能把数组作为参数传给存储过程

写有一个过程,要把一个字符串数组做输入参数,过程如下,但是不知道怎么在C#中把一个数组传组这个过程,或是根本就不能在C#中把一个数组传组存储过程,请高手指点一下!!!

过程如下:
create or replace package test_modality_bdpart_pck
is
TYPE t_cursor is ref cursor;
TYPE exam_array is table of varchar2(100) index by BINARY_INTEGER;
procedure test_modality_prc(i_exam_uid IN exam_array,
cur_modality OUT t_cursor);
end test_modality_bdpart_pck;

create or replace package body test_modality_bdpart_pck is
procedure test_modality_prc(i_exam_uid IN exam_array,
cur_modality OUT t_cursor)
i s
.............................
begin
..............................
end test_modality_prc;
end test_modality_bdpart_pck ;

下面是用C#的写的让一数组做过程参数的句子
string[] arrUID = {

"20060811180452562000","20060811180453546000","20060811180454250000","20060811180455750000","20060811180456640000"};
OracleConnection conn = new OracleConnection(connstring);
OracleCommand cmd = new OracleCommand();
cmd.Connection = conn;
cmd.CommandText = "test_modality_bdpart_pck.test_modality_prc";
cmd.CommandType = CommandType.StoredProcedure;
/*********下面的这句是要把数组做为过程参数,这样写对不对,不对怎么修改???****************/
cmd.Parameters.Add("i_exam_uid", OracleType.VarChar,100).Value = arrUID;
cmd.Parameters.Add("cur_modality", OracleType.Cursor).Direction =ParameterDirection.Output;

搜索更多相关主题的帖子: OracleType 参数 类型 
2006-08-18 13:47



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-84689-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.343124 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved