写有一个过程,要把一个字符串数组做输入参数,过程如下,但是不知道怎么在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;