Page 1 of 1

Stored procedure input parameters ordering

Posted: Tue 14 Dec 2010 05:39
by Alex123
Hi,

I've noticed that when I call stored proc, its parameters must be in exactly same order as they are defined in the Oracle. This was not the case for Microsoft implementation of Oracle data provider for .Net.

So my question is there any way to make dotConnect to ignore the order of stored proc parameters? We've got a big legacy project with a lot of stored proc calls. It's a bit painful for us to check parameters order for each one of them.

Posted: Tue 14 Dec 2010 08:50
by Shalex
Please refer to the Using Parameters article in our online documentation:
If parameters are added to the command collection in the order that is different from the function parameters order in database, it is necessary to describe the command by setting OracleCommand.ParameterCheck to true to reoder parameters in a proper way.

Posted: Tue 14 Dec 2010 22:50
by Alex123
Thanks mate!
Using ParameterCheck set to true does resolve the problem above.
However, it has unexpected side effect in regards to default parameters.
It creates default parameter without setting its default value and that causes an exception. Is there any workaround?

Posted: Fri 17 Dec 2010 19:22
by Shalex
Please use the OracleCommand.PassParametersByName=true option (instead of OracleCommand.ParameterCheck=true). Also please send us a small test project with the corresponding DDL/DML script to reproduce the problem with ParameterCheck in our environment.

Posted: Mon 10 Jan 2011 10:02
by Shalex
We have changed the behaviour of dotConnect for Oracle. Stored procedures will be called with named parameters if OracleUtils.OracleClientCompatible is set to true starting from the next build of dotConnect for Oracle. I will post here when it is available for download.

Posted: Thu 27 Jan 2011 16:27
by Shalex
New version of dotConnect for Oracle 6.10 is released!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only): http://secure.devart.com/ .
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=20115 .