Insert bulk of record with UniDirect

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for universal data access
Post Reply
gala_l
Posts: 13
Joined: Tue 31 Jul 2007 04:05

Insert bulk of record with UniDirect

Post by gala_l » Mon 01 Jun 2015 22:04

We are using UniDirect component with ADO.Net. Is there a way to insert a lot of records with one command? Like Oracle FORALL command?

Thank you, Galina

Pinturiccio
Devart Team
Posts: 2125
Joined: Wed 02 Nov 2011 09:44

Re: Insert bulk of record with UniDirect

Post by Pinturiccio » Tue 02 Jun 2015 13:15

dotConnect Universal uses common features of ADO.NET providers and does not use the specific provider features. For example, dotConnect for Oracle allows using bulk insert. For more information, please refer to
https://www.devart.com/dotconnect/oracl ... yBind.html
https://www.devart.com/dotconnect/oracl ... oader.html

But there is no such feature in dotConnect Universal.
gala_l wrote:Like Oracle FORALL command?
You can create a stored procedure with the FORALL statement. This procedure can be used in dotConnect Universal too.

Galina75
Posts: 1
Joined: Tue 02 Jun 2015 17:17

Re: Insert bulk of record with UniDirect

Post by Galina75 » Tue 02 Jun 2015 17:30

Now I have a stored procedure which I call using UniCommand:

UniCommand cmdInsertTemp = new UniCommand();
cmdInsertTemp.Connection = connDB;
cmdInsertTemp.CommandText = "begin my_procedure(@Array); end;";

cmdInsertTemp.ParameterCheck = true;
cmdInsertTemp.Parameters["@Array"].Value = keyArray;
cmdInsertTemp.Parameters["@Array"].UniDbType = UniDbType.Array;

1. stored procedure parameter is VARRAY
2. keyArray is int[]
3. I'm getting the error about ObjectTypeName. What am I missing?

Pinturiccio
Devart Team
Posts: 2125
Joined: Wed 02 Nov 2011 09:44

Re: Insert bulk of record with UniDirect

Post by Pinturiccio » Wed 03 Jun 2015 14:49

We have reproduced the issue. We will investigate it and post here about the results as soon as possible.

Post Reply