Message form SQL Server to Visual Studio

  • I want to send message to my calling application Visual Studio. I used Raiserror to create error mesage. The command runs without error when executed in the SQL Management Studio.

    Please help me to programme Visual Studio to display the message in a Message Box

    V.Kadal Amutham

  • You must use ADO to capture the error when running the stored procedure from the client. Google ADO error capture stored procedure. The difference btw ADO and DAO errors, is that SQL server can issue multiple errors to the client, rather than just one error.

    Or your can have your error posted to a message log table, via INSERT TSQL. And allow that table to be read into your message box.

    Reading : http://www.sommarskog.se/error-handling-I.html

  • I Have solved the problem myself. I inserted a try catch and end try statement in my Visual Basic program. in the catch part, I handled the sqlexception message into message box. IT works fine

    If some body needs the code I can give the same

    V.Kadal Amutham

    vkadal@gmail.com

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply