troubleshooting Question

Record set Move Next fails for MS Access DB

Avatar of DoofuS
DoofuS asked on
Microsoft AccessJavaScriptHTML
16 Comments1 Solution516 ViewsLast Modified:

I am calling a javascript function from a click event of a button (HTML). I can get the record count (which happens to be 9). The database used is MS Access. But itfails every time it gets to the "MoveNext" of the recordset. Below is the code:

Thanks for all the help!
function FetchNextData() {
      var cn;
      var rs;
      var sql;
      var conn;
      var sql; 
      var i;

      rs = new ActiveXObject("ADODB.Recordset");
      conn = new ActiveXObject("ADODB.Connection");
      val ="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\QTPDb.accdb;Persist Security Info=False"; (val);	 
	  rs.CursorType = 3;

	  sql ="select CauseOfLoss1 from IMContEquip1"; (sql,conn);
	 // (sql,conn,1,1);
	 //alert ("Record Count  " + rs.recordcount);
	  while (!rs.EOF)
		//document.forms['frm'].elements[4].value = rs(i);
	  conn.close (); 


Open in new window

Join our community to see this answer!
Unlock 1 Answer and 16 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 16 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros