Page 1 of 1

Oveloaded functions

Posted: Tue 02 Nov 2010 11:22
by DTSup
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

Posted: Tue 02 Nov 2010 17:49
by Shalex
Yes, you can do that in OraDeveloper Studio and dotConnect for Oracle. If you encounter any difficulties, let us know.

Posted: Mon 08 Nov 2010 12:28
by DTSup
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

Posted: Tue 09 Nov 2010 09:57
by Shalex
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.