No, you can't simply assign from an object reference to an int reference, but the actual object itself, I would have thought, would be an int so you should be able to cast it as such:
Code:
                if (result is System.DBNull)
                {
                    return_value = 0;
                }
                else
                {
                    return_value = (int)result;
                }
If that doesn't work then the actual object must be some other type. I would have thought that ExecuteScalar would return an int in that situation but, if it doesn't, it would have to be an OracleNumber like ExecuteOracleScalar. In that case it would be more appropriate to do this:
Code:
                if (result is System.DBNull)
                {
                    return_value = 0;
                }
                else
                {
                    return_value = Convert.ToInt32(((OracleNumber)result).Value);
                }