« XPath and default namespace in .NET | Main | Overflow checking in .NET »
October 13, 2005
Empty array in Oracle and .NET
Looks like Oracle doesn't like you passing an empty array. I've been getting this weird OracleParameter.Value is invalid. The strange thing is checking out Google doesn't give me much, this one kinda describe my problem:
http://forums.oracle.com/forums/message.jspa?messageID=947090
Basically if you have an array in your stored proc as a parameter, you need to make the array size to be at least 1, otherwise the said error will happen. This is really inconvenient since now you have to check whether it's your workaround or it's a real value.
One way to get around this is to have an array size parameter, this will work alright if you are converting DataTable into arrays, 1 parameter can indicate the size of the collection of array you are sending to Oracle. However for a single array send up this can be really annoying.
Posted by vhadiant at October 13, 2005 06:46 PM
Trackback Pings
TrackBack URL for this entry:
http://www.hadianto.net/mov32/mt-tb.cgi/121
