Array Binds with Tables which include Objects

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
dedgar
Posts: 6
Joined: Tue 22 Nov 2005 10:23

Array Binds with Tables which include Objects

Post by dedgar » Wed 23 Nov 2005 15:11

Hi All

If I try array binding to insert into a table which contains columns of a user defined type I always get an error message:

Code: Select all

Argument 'Iters' must be equal to ArrayLength
I can insert regular column data via array binding and I can insert objects via the normal, round trip each time, binding.

Sooo.... am I correct. Is it not possible to array bind an insert if one of the columns is of type OracleObject? Please advise. If this is the expected behaviour I recommend mentioning this in the documentation - would have saved me a lot of time.

Oracle 9.2, OraDirect 3.1.5, VS 2003 C#

Cheers
Dale

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Thu 24 Nov 2005 06:30

Please see "Working with VARRAY type" article in OraDirect .NET documentation. Please do not set ArrayLength property. It is used for PL/SQL table parameters.

dedgar
Posts: 6
Joined: Tue 22 Nov 2005 10:23

Post by dedgar » Thu 24 Nov 2005 08:33

I have looked closely at the VARRAY, Object and Array binding documentation.

You may have mis-understood the question I was asking. What I was trying to do is perform an array insert using binding to an array of OracleObject's. Essentially an array of OracleObject classes. The documentation doesn't say you can do this - but it doesn't say you can't either. So what I was asking was - is it possible? Since array bind inserts with OracleLob objects works OK I thought that a similar thing might be possible with OracleObject classes.

Looks like it is not possible. Thats OK I can use the round trip per row method as illustrated in the documentation which works fine.

Please don't get me wrong - I think you have done a good job on the really complex stuff. I have worked with the OCI dll's and know how hard it is to do. I just recommend an update of the documentation saying something like:

Code: Select all

The use of array binding with OracleObject classes is not supported.

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Fri 25 Nov 2005 07:52

Yes. OraDirect .NET does not support DML array parameters of OracleDbType.Object, OracleDbType.Array,
OracleDbType.Table, OracleDbType.Xml types. We will reflect this in Oradirect .NET documentation.

Post Reply