I'm building an application around a process that I've been given, which
runs several stored procedures in a row.
I have all the code to run the sProcs, but when I'm in Query Analyzer, I get
a message saying:
"The command(s) completed successfully."
My code at this point, which runs the sProcs, is a sub that passes the name
of the sProc as a parameter:
Private Sub ExecSP(ByVal SP As String)
Try
conn = New SqlConnection(strConn)
cm = New SqlCommand(SP, conn)
cm.CommandType = CommandType.StoredProcedure
conn.Open()
cm.ExecuteNonQuery()
Catch ex As Exception
lblResults.Text += BuildError(ex.Message)
Finally
cm.Dispose()
conn.Dispose()
End Try
End Sub
How do I go about getting that message (along with some that say "Rows
Affected (1), etc"?