Click to See Complete Forum and Search --> : Please - help !!!! --- Open an Access Database using Javascript


Wello
09-15-2003, 11:14 AM
I'm trying to open an Access database using a Javascript. My script create an ActiveXObject in JavaScipt and then open the Access database as follow. But I cannot open a database or create a new database using the normal method associated with the ActiveXObject. Why JavaScript can open an ActiveXObject such as Excel application and insert data, but cannot open a Access database in the client side. I really don't get it ??? In the same idea, which MS application can be used in JavaScript using the "new ActiveXObject" method.

I want to open Access and then opened a specific database in JavaScript. Everything is should be local

function test() {
var AccessApp;

// This line works
AccessApp = new ActiveXObject("Access.Application");
// this line works
AccessApp.Visible = true;
// Now Access is opened and visible - your setting in IE must be changed to allow creation of ActiveXObject component

//This line doesn't work ???
AccessApp.NewCurrentDatabse ("C:\test.mdb");

//This line doesn't work ???
AccessApp.OpenCurrentDatabase ("C:\test.mdb");


}


Thanks for your help !!!