ParameterDirection.ReturnValue

  • Thread starter Microsoft Newsgroups
  • Start date
M

Microsoft Newsgroups

It seems I cannot put more than one of SqlParameter of type
ParameterDirection.ReturnValue into a SqlParameter array. If I do, only the
first one is filled in with the return value from the stored procedure and
the others are left not filled in.

Why would I do this? I'm writing a data access component and want to snoop
the return value so instead of looking through the passed SqlParameter array
for ParameterDirection.ReturnValue, I just wanted to push another
SqlParameter into the array.

But it doesn't appear to work. I'm running .NET Framework 1.1 SP1. I swear
this used to work.

Anyone?
 
M

Mary Chipman

You only get one return value per stored procedure. However, you can
pass back additional information using an unlimited number of output
parameters, writing anything you want to them in the body of your
stored procedure. See the topic "Returning Data Using OUTPUT
Parameters" in SQL Server Books Online for more information.

--Mary
 

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