473,325 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Return messages from SProcs

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
0 642

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chandra Mohan | last post by:
Hi All, I have a requirement of calling a Executable from SQL Server. I know we can use - EXEC @result = Master..xp_cmdshell @<command_string> However I want to get the return value (int)...
3
by: Kofi | last post by:
I need just the names of tables, views and sprocs within a SQL Server database. What's the easiest way to do this?
2
by: Chris | last post by:
I think I already know that the answer is that this can't be done, but I'll ask anyways. Suppose you want to use an RDBMS to store messages for a threaded message forum like usenet and then...
0
by: Shaun | last post by:
Hi Just adding some sprocs to a large access 2002 project to enhance speed and stability. Using SQL server 2000 and Access 2002 I have some recordset based sprocs that will return multiple rows,...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
0
by: jeytu | last post by:
Hi all, I'm a newbie with .net. I have created a web method that would return a class. The definition of the class is <Serializable()> Public Class Response Dim l_status As Boolean ...
1
by: tom | last post by:
I have the section of code listed below, but when I return from main an exception is thrown from the library, because while returning, destructor is called on each of the object in the sequence...
4
by: R. K. Wijayaratne | last post by:
Hi everyone, I have a SPROC which selects records into a MSSQL #temp table and then selects the records from that. I drag this SPROC onto the right-hand pane of the DBML diagram, but the method...
3
by: Lauren Quantrell | last post by:
I recently upgraded to SQL Server 2005 from SQL Server 2000, and Access 2007 from 2003. When I run a ADP created in Access 2000 (which worked fine in Access 2002 and 2003) in Access 2007 everything...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.