How to read data from MS Access File using JavaScript
The bellow mentioned script is used to read data from MS Access file and to display the same data on webpage.
This is just a sample, the same may be modified as per requirements
=======================================================================
<html>
<head>
<title>Entitled Document</title>
<script language="JavaScript">
function getdata(){
var cn = new ActiveXObject("ADODB.Connection");
var strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source =1.mdb;Persist Security Info=False";
cn.Open(strConn);
var rs = new ActiveXObject("ADODB.Recordset");
var SQL = "select * from Table1";
rs.Open(SQL, cn);
for(i=0;i<=2;i++)
{
document.write(rs(i));
} rs.Close();
cn.Close();
}
</script>
</head>
<body>
<input type="button" value="Get count" onclick="getdata()">
</body>
</html>
=======================================================================
Hope you all will enjoy this Post. Any kind of positive suggestions regarding this post are heartly accepted. If any one has problem with this post content, kindly let me know through email , i will update or remove this post as soon as possible
Thanks
Regards
Ketan Joshi
SA Palanpur HO
Mo no:+91 8866984506
eMail : k9724675876@gmail.com
0 Comments: