Hi all-
To summarize the situation, I've written a routine that creates an
instance of an Access application on a remote server to do the bidding of
a user via an ASP interface page. It works as advertised when called as
part of a server side routine, and will work from an HTML page on the
client side. What I can't figure out, however, is why it won't work on
the client side if the file extension is .ASP. As a side note, client side
VBScript behaves identically.
Steps to reproduce:
1. Create an empty access mdb file somewhere on your computer to reference
in code, add a function that accepts an argument and displays it as a
messagebox.
2. Follow the steps here to allow Access automation via IIS
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q288366
3. Create two files, one with each extension (html, asp) and paste in the
following:
<html>
<head>
<script language='javascript'>
<!--
function test(){
var db = new ActiveXObject("Access.Application");
db.OpenCurrentDatabase ("path to access app");
db.Run("somefunction", "someparameter");
db.quit;
}
-->
</script>
</head>
<body>
<a onclick='javascript: test();'
target='top'
style='cursor:hand;'>
clickme
</a>
</body>
any clue?