Hello there,
I searched for answers to the above topic, but could not find what I want. My stored procedures and triggers are returning a message based on the result, mostly error messages. How can I get that message using ASP.Net? Should I use an output parameter?
Thank you for your help.
Use this type dataset generator it will do it for you. you select which sp to use with a gui and paf you get a nice typed dataset class.
Enjoy I love it greatly
SQL Stored Procedure Wrapper & Typed DataSet Generator for .NET...
www.codeproject.com/cs/database/dbhelper.asp
Joel,
Thank you for the reply and a looking great tool. I will try it. I am not sure thought if it will answer, but trust you.
Another way I just found is that using Exception class in an event in .Net. For example, if you delete a row in a gridview and trigger is fired for some reason and raises an error, it is passed to theGridViewDeletedEventArgs.So you can that message withGridViewDeletedEventArgs.Exception.Message. You can do it GridView1_RowDeleted() event.
I hope this helps someone like me.
No comments:
Post a Comment