ExecuteXmlReader - output parameter

  • Thread starter Thread starter Chakra
  • Start date Start date
C

Chakra

Hi,
I am using SQL Server 2000 as database server. I am
trying to execute a stored procedure with a OUTPUT
parameter. The problem that I am having is that if I call
objCommand.ExecuteNonQuery, the OUTPUT parameter gets the
right value. But if I execute
objCommand.ExecuteXmlReader, the OUTPUT parameter value is
null. Rest of the code is same. I am using Framework
1.1.

Let me know if this is a known issue and if so any
workaround?

Thanks for help.
chakra
 
Hi,

Try this,
First close the XmlReader object and then access the output parameter value.

Javed.
 
parameter values are returned after all result sets, so you must read all
rows and results sets (NextResult()) before the values are valid.

-- bruce (sqlwork.com)
 
Wow! That worked. Thank you so much.

Chakra
-----Original Message-----
parameter values are returned after all result sets, so you must read all
rows and results sets (NextResult()) before the values are valid.

-- bruce (sqlwork.com)





.
 

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

Back
Top