<html>
<head>
<title>Entitled Document</title>
<script language="JavaScript">
function getCount(){
var cn = new ActiveXObject("ADODB.Connection");
var strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = F:\PhoneGap\bloodGroupDataBase.accdb;Persist Security Info=False";
//is there any wrong in this connection string
cn.Open(strConn);
var rs = new ActiveXObject("ADODB.Recordset");
var SQL = "select count(*) from sheet1";
rs.Open(SQL, cn);
alert(rs(0));
rs.Close();
cn.Close();
}
</script>
</head>
<body>
<input type="button" value="Get count" onclick="getCount()">
</body>
</html>
srikanth_1 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.