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!

Invalid Parameter Binding - Jagged Array to User Defined Structure Type

721872May 27 2010 — edited May 27 2010
Hello All:

I am in the process of creating some web-services to replace an Oracle to Oracle link.

Right now, there is a stored procedure call, that looks something like this:

URecord(p1, p2, p3, filledRecord)

filledRecord is a user-defined type of the following:

TYPE tableDefArray IS Table of FeatureDef and FeatureDef is defined as:

TYPE featureDef IS Record(
featurename VARCHAR2 (60),
featurevalue VARCHAR (500)
)

Basically: as you can see, it is just a name / value pair being passed into the store procedure. However: from web-services, we cannot send a Hashtable, nor can we send multi-dimensional arrays (they are not supported in web-services). The closest I can get is a jaggedarray passing to the stored procedure so I set the parameter type in my code to an ARRAY.

public void URecord(string p1, string p2, string p3, string[][] FilledRecord)
{
........various code to set database connection and other parameters.........
oCommand.Parameters.Add("filledrecord", OracleDbType.Array).Value = FilledRecord;

oConn.Open();
oCommand.ExecuteNonQuery();
oConn.Close();

}

However, when I execute the procedure, I get the error "Invalid parameter binding\r\nParameter name: filledrecord." I assume it has to do with trying to pass an Array to the UserDefined type of TableDefArray, but I am not 100% of this. Or does it have to do with setting a jaggedarray to a type of Array in the Parameter list?

Unfortunately: I am not the database programmer to know, just the web-service end of this. Is there something on my end to make this work, or is the web-service portion correct and the stored procedure needs to be changed a little to make this work? I would think something on the C# / web-services end is the bottleneck, but I am not certain of this.

Any help would be greatly appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 24 2010
Added on May 27 2010
6 comments
2,965 views