In my stored procedure I have something like this<BR>IF @@ERROR &#060;&#062; 0<BR> begin <BR> SET @LogMsg = 2<BR> End<BR>Else<BR> begin<BR> SET @LogMsg = 1 <BR> End<BR> <BR>When I call the stored procedure from VB it returning the error message correctly. I am inserting a duplicate row, therefore it should return 2 as my error message. When I test it through my COM it&#039;s returning the right value, but when I call the COM object in my ASP it&#039;s always returning the error message as 1, means it din&#039;t find the error.<BR><BR>If any of you have any idea please help me.<BR>