Opening Access DB using ActiveX

S

spmm#

Hi,

From my html page I'm using the following script to open an access database
and execute some marco from it:

<script language=javascript>
function startAccess(db, macro)
{
var app = new ActiveXObject("Access.Application");
app.SetDefaultWorkgroupFile("c:\\System.mdw");
app.OpenCurrentDatabase(db, true, "");
app.DoCmd.RunMacro(macro, 1, null);
app.Quit();
}
</script>

I know it's not great practise, but it's just a temporary solution we need.
My problem is: because of the workgroup I have to provide a username and
password, but I can't get it done programatically. Normally I would use
/user and /pwd from the command line, but that doesn't work here. Does
anyone know how this can be done programmatically?????

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top