Oracle Function

G

Guest

I guess there must be something different in calling an Oracle Function vs. a
Oracle Procedure. I have procedures working just fine, but when I go to call
an Oracle Function, I never get anything returned.
I was getting an error indicating that the wrong number of parms or the
wrong type of parms errors, until I changed the "direction" to "Return
Value", once I did this, then those errors went away, but when I read the
datareader or ExecuteScalar, nothing is ever return. When I execute the
function in Toad, it returns a value, so I know the function works in Oracle.
What am I missing about how to call a function?

Thanks inadance for your assistance!!!
 
C

Cowboy \(Gregory A. Beamer\) [MVP]

I see two options, as far as ease of use:

1. Switch to ODP.NET from http://otn.oracle.com (free download with reg)
2. Wrap the function in a proc

I have used functions extensively in some of my work, but they are wrapped
in procs. As I attempt to build most pages with one call to the database,
this is quite condusive to my work. You may find it is simply another step
to make something work.

You can also send the raw SQL to call the function as a string, instead of
trying to call off a command object with params.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top