这段代码似乎实际上并没有返回任何东西。无论它测试的是真还是假,也不是if之外的行。有回应。但响应中没有正文。我很困惑。
我可以直接在服务器上运行 sql 字符串并获得预期的响应。
SQLcmd.CommandText = (SQLString)
SQLdr = SQLcmd.ExecuteReader
While SQLdr.READ()
IF SQLdr(0) = "notadded" THEN
context.Response.WRITE("notadded^") 'This is not in the body of the response
ELSEIF
context.Response.WRITE("added^" + SQLdr(0) + "^") 'This IS NOT IN the body OF the response
END IF
context.Response.WRITE(SQLcmd.CommandText) 'This is not in the body of the response
End While