Quote Originally Posted by gary90 View Post
hi ,,

thanks but i cant get all data rows from my db ,.,please help me thanks in advance
This work for me here:

function query(){
var pad = "C:\\Users\\XXXXXX\\Documents\\DATABASENAME.accdb";
var cn = new ActiveXObject("ADODB.Connection");
var strConn = "Provider=microsoft.ace.oledb.12.0;Data Source=" + pad;
cn.Open(strConn);
var rs = new ActiveXObject("ADODB.Recordset");
var SQL = "SELECT * FROM tblName";
var i = 100;
rs.Open(SQL, cn);
if(!rs.bof) {
rs.MoveFirst();
while(!rs.eof) {
document.write();
document.write("<p>" + rs.fields(1).value + " ");
document.write(rs.fields(2).value + " ");
document.write(rs.fields(3).value + " ");
document.write(rs.fields(4).value + ".</p>");
rs.MoveNext();
}
}
else {
document.write("No data found");
};
rs.Close();
cn.Close();
}