Stored procedure input parameters ordering

Stored procedure input parameters ordering

Postby 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.
Alex123
 
Posts: 4
Joined: Thu 09 Dec 2010 00:53

Postby 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.
Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44

Postby 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?
Alex123
 
Posts: 4
Joined: Thu 09 Dec 2010 00:53

Postby 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
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44

Postby 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
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44

Postby 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 .
Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle