By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,815 Members | 1,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,815 IT Pros & Developers. It's quick & easy.

Return messages from SProcs

P: n/a
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"?

Oct 30 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.