473,395 Members | 1,774 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,395 software developers and data experts.

Sql Server messages

I have a stored procedure that I run from an asp.net application that
simply backs up a very small Sql Server database. If I run the stored
procedure in Query Analyzer, there is a server message returned
letting me know that the database was backed up successfully. I want
to be able to return this message in the asp.net application for
display on the screen because it contains some other useful
information. Does anyone know how to return the server message. Thanks
in advance.

-Rob
Nov 18 '05 #1
3 1070
Hi Rob:

Add an event handler for the InfoMessage event on the SqlConnection
used to execute the stored procedure. The messages will arrive there
after the query completes.

HTH,

--
Scott
http://www.OdeToCode.com

On 7 May 2004 12:26:26 -0700, ro*********@wbp.org (Robert Bull) wrote:
I have a stored procedure that I run from an asp.net application that
simply backs up a very small Sql Server database. If I run the stored
procedure in Query Analyzer, there is a server message returned
letting me know that the database was backed up successfully. I want
to be able to return this message in the asp.net application for
display on the screen because it contains some other useful
information. Does anyone know how to return the server message. Thanks
in advance.

-Rob


Nov 18 '05 #2
Rob

Worked great Scott...thanks a lot.

-Rob
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
CT
In addition to Scott's reply, messages with a severity level of 19 or more,
will throw an exception in your code.

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"Robert Bull" <ro*********@wbp.org> wrote in message
news:bf**************************@posting.google.c om...
I have a stored procedure that I run from an asp.net application that
simply backs up a very small Sql Server database. If I run the stored
procedure in Query Analyzer, there is a server message returned
letting me know that the database was backed up successfully. I want
to be able to return this message in the asp.net application for
display on the screen because it contains some other useful
information. Does anyone know how to return the server message. Thanks
in advance.

-Rob

Nov 18 '05 #4

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

Similar topics

1
by: ehendrikd | last post by:
hi all i have written a php site that uses the mail() on windows and i had to state in the php.ini file which smtp server to use. have now migrated this site to a redhat 9 server, but i still...
4
by: Madestro | last post by:
Hi guys, I am making a small program to retrieve e-mails from POP accounts. I got all the e-mail parsing stuff figured out, but I cannot seem to come up with a way to find out which e-mails are...
1
by: Covi | last post by:
Hello, I have a SS2K (SP3) that is appending very wierd looking error messages to the SQL Server Log (Current). The messages are not formatted as other log entries. The messages suggest some...
0
by: Jonas Hei | last post by:
I need to develop a scalable server which has to receive and send UDP messages. It is required to process hundreds of messages (coming from different remote computers) per second (possibly even...
5
by: zorhel | last post by:
Hi. My clients will be IE, Mozilla and Opera in a Windows and *nix OS. So, my web app need to, from a server, send messages to a specific client (browser), send messages for all clients,...
2
by: Mały Piotruś | last post by:
Hello, (sorry for my English...) Could you help me please with installing SQL Servera 2005 Express Edition. I downloaded files: SQLEXPR.EXE - Microsoft SQL Server 2005 Express Edition...
2
by: FayeC | last post by:
Can anybody point me to a good tutorial/manual on advanced server-side form validation including validation of fields against unwanted strings such as the use of "http://". Thank you in advance,...
14
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
2
by: Wade Ward | last post by:
First-time poster here in perl-land: I had a close working relationship with a fellow at the University of Minnesota named Kevin. He ran the whole show with perl. I am trying to do something...
5
by: =?Utf-8?B?TWFya1NraQ==?= | last post by:
For about a month now, I have had trouble with Outlook Express. When logging in to Outlook Express, I get an error message stating that the connection to server has failed. My internet connection...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.