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
Insert bulk of record with UniDirect
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Insert bulk of record with UniDirect
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.
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.
You can create a stored procedure with the FORALL statement. This procedure can be used in dotConnect Universal too.gala_l wrote:Like Oracle FORALL command?
Re: Insert bulk of record with UniDirect
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?
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?
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Insert bulk of record with UniDirect
We have reproduced the issue. We will investigate it and post here about the results as soon as possible.