Oveloaded functions

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
DTSup
Posts: 5
Joined: Tue 02 Nov 2010 10:45

Oveloaded functions

Post by 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

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

Post by 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.

DTSup
Posts: 5
Joined: Tue 02 Nov 2010 10:45

Post by 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

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

Post by 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.

Post Reply