Oracle Output Parmeter

G

Guest

Hi there,
I try to write out an oracle parameter from a stored procedure, but only
receive the name of the parameter. Here is what I do:

cmd.Parameters.Add(new OracleParameter("confidential",
OracleType.Number)).Direction = ParameterDirection.Output;

then i just try this:

string strPageAccess = cmd.Parameters["page_access"].Value.ToString();

which gives the error: Object reference not set to an instance of an object

Trying:
string strPageAccess = cmd.Parameters["page_access"].ToString();

Just gives out the parameter name.

What am I doing wrong? Thanks

Chris
 
G

Guest

don't worry. I worked it out.

Thanksa guys. The code was right. I just forgot something els
 

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