Re: Error Messages?
- From: "Jonathan Wood" <jwood@xxxxxxxxxxxxxxxx>
- Date: Thu, 31 Jan 2008 18:55:04 -0700
Thanks, but I have no idea what InfoMessage is or how it is used.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
"W.G. Ryan" <WilliamRyan@xxxxxxxxxxxxxxxx> wrote in message news:OElZ1kEZIHA.1204@xxxxxxxxxxxxxxxxxxxxxxx
Jonathan:
I don't know the exact number but I think it's 13 - if you use the InfoMessage event of the SqlConnection object, you can get back low priority messages. One thing you can do is for instance, check the @@Error and Send out an 'error' message that InfoMessage will pick up. I had a client that was really big on this approach and used PRINT statments throughout their sql if a certain tracing flag was set, they'd echo back very detailed information about the completion of the routine and just write it out w/ print - then use InfoMessage to pick it up. I think this will work for what you want to do.
--
bill.ryan | technology.evangelist | magenic.technologies
mvp - device application development
http://www.msmvps.com/WilliamRyan
http://www.magenic.com
"Jonathan Wood" <jwood@xxxxxxxxxxxxxxxx> wrote in message news:%23eyp$xqYIHA.5348@xxxxxxxxxxxxxxxxxxxxxxxCurrently, I tend to return @@ERROR in my stored procedures so that the calling code can test for error conditions. But I'm wondering: When @@ERROR is non-zero, is there a way for ADO.NET to detect any specific error messages?
Thanks.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
.
- Prev by Date: Re: SQL CLR Sproc isn't running right
- Next by Date: Re: Looking for Design Suggestions
- Previous by thread: Re: SQL CLR Sproc isn't running right
- Next by thread: Re: Looking for Design Suggestions
- Index(es):