PLSQLAssociativeArray – Passing Null Values How?
539527Apr 5 2007 — edited Jun 5 2008The AssoicativeArray code below works fine if I pass a value. In the ELSE I am passing a null value based on an example I found on the forum.
if (CheckBox1.Checked == false)
{
//Pass a value - Not Null
string[] SumBy = new string[1] { "llth.LOSS_PAID_OR_RESV_AMT" };
prm = new OracleParameter("itbl_sum_slctn", OracleDbType.Varchar2);
prm.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
prm.ArrayBindSize = new int[1] { 38 };
prm.Value = SumBy;
cmd.Parameters.Add(prm);
}
else
{
//Null Params
prm = new OracleParameter("itbl_sum_slctn", OracleDbType.Varchar2);
prm.Direction = ParameterDirection.Input;
prm.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
prm.Size = 1;
prm.ArrayBindStatus = new OracleParameterStatus[] {
OracleParameterStatus.NullInsert };
string[] SumBy = { null };
prm.Value = SumBy;
cmd.Parameters.Add(prm);
}
No matter what I try I continue to get…
ORA-00909: invalid number of arguments
ORA-06512: at "AWH.PKG_LGCY_LOSS", line 2267 ORA-06512: at line 1
Any help would be appreciated.
Thank you,
Patrick