Stored procedure input parameters ordering

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Alex123
Posts: 4
Joined: Thu 09 Dec 2010 00:53

Stored procedure input parameters ordering

Post by Alex123 » Tue 14 Dec 2010 05:39

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 14 Dec 2010 08:50

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.

Alex123
Posts: 4
Joined: Thu 09 Dec 2010 00:53

Post by Alex123 » Tue 14 Dec 2010 22:50

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?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 17 Dec 2010 19:22

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 10 Jan 2011 10:02

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 27 Jan 2011 16:27

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 .

Post Reply