Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PLSQLAssociativeArray – Passing Null Values How?

539527Apr 5 2007 — edited Jun 5 2008
The 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 3 2008
Added on Apr 5 2007
10 comments
5,176 views