SQL Help - Sp_helpMe

Results 1 to 2 of 2

Thread: SQL Help - Sp_helpMe

  1. #1
    EggMan Guest

    Default SQL Help - Sp_helpMe

    I have created a stored procedure below and what to output the return value. I have produced a script to output the return value but something is wrong - please help, I am racking my brains !<BR><BR>create procedure sp_myselecttype <BR> @username char<BR>AS<BR>if exists(Select * From input<BR>Where username = @username<BR>)<BR> return(1)<BR>else<BR> return(0)<BR>Go<BR><BR><BR>&#060;%<BR>con.Open DSNtemp<BR>set rs=con.execute(sqlstring)<BR>&#039; ** This is the line I don&#039;t think I am calling correctly<BR>IsValid = con.Parameters("return").Value<BR>If IsValid = 0 Then<BR> Response.write "Bad"<BR>End If<BR> Response.write "Good"<BR>Con.close<BR>set con=nothing<BR>%&#062;<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL Help - Sp_helpMe

    Change your return (1) and return (0) lines to:<BR><BR>SELECT "1" &#039;Return&#039;<BR><BR>and<BR><BR>SELECT "0" &#039;Return&#039;<BR><BR>That&#039;ll give you what you&#039;re looking for

Posting Permissions

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