日期:2014-05-16  浏览次数:20954 次

asp到底他妈的怎么链接数据库?
 ADODB.Field 错误 '80020009' 

BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。 


 <% if action = "0" or action = "1" then '如果是新增修改%>
    <%
        'if uid <>"" then
            cmdText = cmdText & "where User_id = '"&uid&"'"
            connopen
            set rs = conn.execute(cmdText) 
           ' if  rs.EOF  then
                  ' response.write "用户不存在!"
                   'response.end
      ' conn.close
           '  end if
 
       ' end if
     %>


------解决方案--------------------
你要判断下是否有记录,没有记录你进行读操作当然出错了
 <% if action = "0" or action = "1" then '如果是新增修改%>
    <%
        'if uid <>"" then
            cmdText = cmdText & "where User_id = '"&uid&"'"
            connopen
            set rs = conn.execute(cmdText) 
         if  rs.EOF or rs.bof  then
                  'response.write "用户不存在!"
                   response.end
                  conn.close
            end if
          
       ' end if
     %>