I got this code while browsing through some blogs. It illustrates how to connect to Access Database using Javascript.
function Press()
{
var cn = new ActiveXObject("ADODB.Connection");
var strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = test.mdb;Persist Security Info=False"; cn.Open(strConn); var rs = new ActiveXObject("ADODB.Recordset");
var SQL = "select * from Table1"; rs.Open(SQL, cn);
while(!rs.eof)
{
document.write(rs.Fields("Name").Value + "
");rs.MoveNext()
}
rs.Close();
cn.Close();
}
Tuesday, March 20, 2007
Access Database Using Javascript
Category
JavaScript And Ajax