return data from stored procedure

  • Thread starter Thread starter smk23
  • Start date Start date
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!!
 
Back
Top