Oveloaded functions

Oveloaded functions

Postby DTSup » Tue 02 Nov 2010 11:22

Is it possible to call overloaded functions in OraDeveloper Studio and dotConnect for Oracle? For example there are two functions with the same name "INS" but with different parameters
DTSup
 
Posts: 5
Joined: Tue 02 Nov 2010 10:45

Postby Shalex » Tue 02 Nov 2010 17:49

Yes, you can do that in OraDeveloper Studio and dotConnect for Oracle. If you encounter any difficulties, let us know.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Postby DTSup » Mon 08 Nov 2010 12:28

I confirmed it works great. Thank you. But sometimes you can get strange error if you have mismatch types of parameters. For me it was Timestamp and Date. In this case you'll see a message that dotConnect can't find appropriate function and nothing about parameters
DTSup
 
Posts: 5
Joined: Tue 02 Nov 2010 10:45

Postby Shalex » Tue 09 Nov 2010 09:57

We recommend setting the exact number of procedure overload after the name of the procedure in the CommandText property (the number of overload is determined by the order of the procedure creation in the package).
E.g., use
command.CommandText = "PACKAGE_NAME.PROCEDURE_NAME:2";
instead of
command.CommandText = "PACKAGE_NAME.PROCEDURE_NAME";

You can see the number of overload you need using the design time component OracleCommand: drag&drop this component on Form Designer > select its CommandText property > set Type to StoredProcedure and choose one of the available overloads in the Object Name drop-down list, then navigate to the Parameters tab, confirm regeneration of the Parameters collection, and you can determine in this way which overload the selected number of overload corresponds to.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle