Error messages from SQL Server

  • Thread starter Thread starter Ray
  • Start date Start date
R

Ray

Hi,
I intentionally modified a stored proc to raise an error
and this is the message in Query Analyzer when I run the
sp:
Server: Msg 8152, Level 16, State 9, Procedure MyTest,
Line 5
String or binary data would be truncated.
The statement has been terminated.
Server: Msg 50000, Level 16, State 1, Procedure test, Line
8
Unknown Product ID: abc

As you can see there are 3 error messages (last one is
raised by RaisError function). The only one I can identify
from my vb.net app via sqlException is: "String or binary
data would be truncated."
My question is how to view the rest of messages via VB.NET.
Tia,
Ray
 
Hi

declare a OUTPUT parameter and assign you message to
OUTPUT Parameter.

From VB.NET check OUTPUT Parameter.

HTH
Ravikanth[MVP]
 
Back
Top