为什么下面的在中使用VBScript (经典的ASP)
Dim y: y = rs("file_description")
Dim x: x = (instr(y, "Internal Server Error") <> 0 or instr(y, "Server Unavailable") <> 0) AND instr(y, "RetryCount=9") = 0但是这个不工作。它停止执行(没有错误编号或描述!)
dim x: x = (instr(rs("file_description"), "Internal Server Error") <> 0 or instr(rs("file_description"), "Server Unavailable") <> 0) AND instr(rs("file_description"), "RetryCount=9") = 0奇怪的是,简单地将rs("file_description")表达式提取到变量中会导致代码工作。
我不明白为什么。
发布于 2014-12-16 12:38:50
rs("file_description")可以表示字段对象或其默认属性.Value。VBScript根据上下文选择一种或另一种。因为
y = rs("file_description")不使用Set吗,y将包含.Value。若要为第二次报告清楚起见,请使用
x = (instr(rs("file_description").Value, ...https://stackoverflow.com/questions/27504662
复制相似问题