>>>>>Hi All, I'm playing around with Raiserror() and would like to display my own error message without all the other stuff i.e. sp name, line number etc..., is this possible ?
>>>>
>>>>You have to supply to the RAISERROR statement at least 3 parameters
>>>>
>>>>
>>>>RAISERROR ('My Message', 10,1)
>>>>
>>>
>>>Hi Sergey, that is exactly what I'm doing and see a MessageBox with five lines of information - Index #0 - 'The error' - LineNumber: 12 - Source: >NET.SqlClient Data Provider - Procedure: MySP. What I would like, is , to just see the message text without all the other stuff
>>
>>That sounds as if you aren't catching the error in .NET - i.e. you're looking at the .NET exception that flows from it.....
>
>Hi Viv, I have a try catch(SqlException e) but this doesn't trap it - should I try a different Exception type ?
TBH, from the top of my head, I don't know - why not, for now, just catch the general exception and see what type is turns out to be......