title: Javascript error: Either BOF or EOF is True, or the current record has been deleted
body: <p>I created the below javascript to check whether the given email id is already exixt in ms access database and getting the below error. Could anyone please help me to get rid of this. Thanks in advance...</p>
  
  <p><strong>Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.</strong></p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;script&gt;
              function fnchk()
              {
                  var eid = document.f1.t1.value;
                  var cn = new ActiveXObject("ADODB.Connection");
                  var rs = new ActiveXObject("ADODB.Recordset");
                  cn.open("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=/\dth.accdb;");
                  var qry = "select * from reg where email = '"+ eid +"'";
                  rs.open(qry,cn,1,3);
                  if(eid == rs.fields("email").value)
                  {
                      alert("Email exists");
                  }
                  else
                  {
                      alert("Email not exist");
                  }
                  rs.close();
                  cn.close();
              }
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;form name="f1"&gt;
              &lt;input type="text" name="t1"&gt;
              &lt;input type="button" value="ok" onclick="fnchk();"&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>