M
mb_howard
I am attempting to build a web page using ASP/VBScript that would be able to
call functions within a Module that exists in an Access 2002 "mdb" file.
The ASP code that I have so far is:
<%
On Error Resume Next
Dim access
Set access = Server.CreateObject("Access.Application")
access.opencurrentdatabase "C:\Inetpub\wwwroot\BizRulesProject\bizrules.mdb"
access.DoCmd.openmodule("BizRuleCode")
If Err.Number <> 0 Then
Response.Write "<P><B>The following Error has occured:</B></P>"
Response.Write "Number: " & Err.Number & "<BR>"
Response.Write "Description: " & Err.Description & "<BR>"
Response.Write "Source: " & Err.Source & "<BR>"
Err.Clear
End If
%>
When I try to view this code through a browser, I get the following error:
Number: -2147417851
If I change the line containing "DoCmd.OpenModule" to "DoCmd.RunMacro" I get
the following error:
Microsoft Access can't find the macro 'BizRuleCode.'
I haven't been able to figure out what error (-2147417851) means. I want to
be able to run a function within the module named "BizRuleCode", pass some
parameters to the function, and receive the values returned by the function.
I am not sure how to make the appropriate object calls (using DAO or ADO) to
invoke the module and call the functions inside the module.
Any advice (with code examples) would be greatly appreciated. My email
address is (e-mail address removed).
HELP!
Matt
call functions within a Module that exists in an Access 2002 "mdb" file.
The ASP code that I have so far is:
<%
On Error Resume Next
Dim access
Set access = Server.CreateObject("Access.Application")
access.opencurrentdatabase "C:\Inetpub\wwwroot\BizRulesProject\bizrules.mdb"
access.DoCmd.openmodule("BizRuleCode")
If Err.Number <> 0 Then
Response.Write "<P><B>The following Error has occured:</B></P>"
Response.Write "Number: " & Err.Number & "<BR>"
Response.Write "Description: " & Err.Description & "<BR>"
Response.Write "Source: " & Err.Source & "<BR>"
Err.Clear
End If
%>
When I try to view this code through a browser, I get the following error:
Number: -2147417851
If I change the line containing "DoCmd.OpenModule" to "DoCmd.RunMacro" I get
the following error:
Microsoft Access can't find the macro 'BizRuleCode.'
I haven't been able to figure out what error (-2147417851) means. I want to
be able to run a function within the module named "BizRuleCode", pass some
parameters to the function, and receive the values returned by the function.
I am not sure how to make the appropriate object calls (using DAO or ADO) to
invoke the module and call the functions inside the module.
Any advice (with code examples) would be greatly appreciated. My email
address is (e-mail address removed).
HELP!
Matt