Syntax check

Results 1 to 2 of 2

Thread: Syntax check

  1. #1
    Join Date
    Dec 1969

    Default Syntax check

    Thanks for your help the last few days. Got another Q:<BR><BR>The following SP does NOT return an error, either on compilation, or execution from an ASP page<BR><BR>CREATE PROCEDURE uSP_UpdateAccount <BR>@acctID varchar(10),<BR>@repID varchar(10),<BR>@status varchar(10),<BR>@retStatus varchar(50) OUTPUT<BR><BR>AS<BR><BR>BEGIN TRANSACTION<BR> UPDATE ACCOUNTS SET STATUS = @status WHERE ACCT_ID = @acctID AND REP_CODE = @repID<BR><BR> IF @@ERROR &#062; 0 <BR> BEGIN<BR> set @retStatus = &#039;ERROR&#039;<BR> ROLLBACK TRANSACTION<BR> return @retStatus<BR> END<BR> ELSE<BR> BEGIN<BR> set @retStatus = &#039;OK&#039;<BR> COMMIT TRANSACTION<BR> return @retStatus<BR> END<BR> <BR><BR>GO<BR><BR>Why am I asking then? I&#039;m trying to response.write the return status and its showing up blank in my ASP page. But the record DOES update. <BR><BR>Am I missing something or shoudl I not worry?

  2. #2
    Join Date
    Dec 1969

    Default Well, yes

    The problem is probably in your ASP code. So, it would be relevant to show that code as well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts