请看一下
Leop 2000-09-14 10:12:00 如下一段代码
strSQL = "Select * From Info Where Username='" & Username & "'"
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open strSQL, objConn, 0, 1
If objRS.RecordCount > 0 Then '这一句始终是真
Session("errMessage") = "您填的用户名已存在,请用别的用户名!"
Response.Redirect "step1.asp"
End If
objRS.Close
objConn.Close
objRS = Nothing
objConn = Nothing
Response.Redirect "step2.asp"
始终执行
If objRS.RecordCount > 0 Then
Session("errMessage") = "您填的用户名已存在,请用别的用户名!"
Response.Redirect "step1.asp"
End If
这一段,为什么?
我用的是Access 97 & Win2k & IIS5.0