From Microsoft
"The ExecuteOracleScalar () method of the OracleCommand class is used to execute an SQL statement or stored procedure that returns a single value as an OracleType data type. If the command returns a result set, the method returns the value of the first column of the first row. The method returns a null reference if REF CURSOR is returned, not the value of the first column of the first row that REF CURSOR points to. The ExecuteScalar () method of the OracleCommand class is similar to ExecuteOracleScalar (), except that it returns the value as a .NET Framework data type.
Having said that, none of these methods will come in handy when working with Oracle stored procedures. Oracle stored procedures cannot return a value as part of the RETURN statement, only as OUT parameters - see Section Stored Procedures that Do Not Return Data. In addition, you cannot return the result set, except for the output parameter REF CURSOR - this is discussed in the next section.
You can only get the return value for an Oracle function using the RETURN parameter (shown in the previous section), and not using one of the ExecuteScalar methods. "
http://msdn.microsoft.com/en-us/library/ms971506.aspx
Herosp
source share