Hi Gurus,<BR><BR>I have an ASP page which call a store procedure in SQL Server.<BR><BR>When the store procedure got an error, I will issue raise Error<BR><BR>RAISERROR (50002, 16, 1, @MsgString) and then RETURN<BR><BR>May I know how can I trap the errorcode returned using ASP ?<BR><BR>I checked the Err.Number but it always gives me -2147217900 but what I want is 50002 which I defined.<BR><BR>Any suggestion ? Thanks in advance