Hi,<br><br>I'm using ODBC to talk to a Sybase database. We <br>have the following stored procedure:<br><br>create proc testproc (<br> @mode char(1) )<br>as<br>SET NOCOUNT ON<br>if @mode = "R"<br> return 20001<br>else<br>begin<br> if @mode = "P"<br> print "20001 printed"<br> else<br> raiserror 20001 "20001 error raised"<br>end<br>go<br><br>If I call it from ODBC (ASP page) with "E" then the <br>connection.errors construct is empty. Same with "R". <br>The only time I can get something into that construct <br>is by calling it with "P", so it does a SQL print.<br>Surely this is wrong? I really need to be able to <br>trap raiserrors in my code, and also trap return <br>values. Possibly the second of these is the most <br>important.<br><br>Anyone seen this before? I've tried the Intersolv <br>ODBC instead with no luck either. The NOCOUNT option <br>was a possible fix on MSDN that didn't work.<br><br>Something tells me I am overlooking the obvious - would <br>one of you kind folks please enlighten me?<br><br>Thanks,<br><br>Bhoupinder Rana<br><br>Sybase 11.5.1 on Sun Solaris (SPARC) 2.6.1<br>ODBC MERANT 3.6 for Sybase ASE on NT4SP5<br>ASP on IIS4<br>