return data from stored procedure

S

smk23

Is there a way to return output from a Stored Procedure with a "SELECT"
statement
using a command object?

My SP is a simple "SELECT t.* FROM Person t WHERE t.PartyID=2"

I realize I can get the result back using a pass-through query, but in this
case I need to use a cmd object:

cmd.CommandText = "nameofSP"
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Append ... the PartyID
cmd.Execute

How do I capture the output at this point? Is my only option to declare an
output parameter?

Thanks so much!!
 

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