Insert bulk of record with UniDirect

Insert bulk of record with UniDirect

Postby 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
gala_l
 
Posts: 13
Joined: Tue 31 Jul 2007 04:05

Re: Insert bulk of record with UniDirect

Postby 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/oracle/docs/?ArrayBind.html
https://www.devart.com/dotconnect/oracle/docs/?Devart.Data.Oracle~Devart.Data.Oracle.OracleLoader.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.
Pinturiccio
Devart Team
 
Posts: 2020
Joined: Wed 02 Nov 2011 09:44

Re: Insert bulk of record with UniDirect

Postby 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?
Galina75
 
Posts: 1
Joined: Tue 02 Jun 2015 17:17

Re: Insert bulk of record with UniDirect

Postby 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.
Pinturiccio
Devart Team
 
Posts: 2020
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect Universal