Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Run Access Macro from ASP Page?

Posted on 2001-08-05
2
Medium Priority
?
580 Views
Last Modified: 2012-08-14
I am creating new web based user interface for MS Access database. Some of the old maintenance procedures are stored as MS Access Macros. Is there any method to do it (execute) inside ASP page?

I found something which is working on PWS, but I am not sure about this solution.

<%
Dim acS
Dim acCmd
Set acS   = CreateObject ("access.Application")
acS.OpenCurrentDatabase "D:\www\Inetpub\scripts\asp.mdb"
Set acCmd = acS.DoCmd
acCmd.RunMacro "TestMacro"
%>
0
Comment
Question by:ppy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Expert Comment

by:webwoman
ID: 6355662
Does this macro require any user intervention? If it does, I wouldn't even attempt to run it (even if you can) unless somebody is at the server to respond.
0
 
LVL 11

Accepted Solution

by:
jekl2000 earned 300 total points
ID: 6356211
This works for me, runs everyday (using Access 97)
Visible can be true or false depending on rather you want to see access start or not. On IIS you also have to set the "Allow out of process components" to yes  in order to run access,,or excel etc.



<% Dim objAcc
Set objAcc=Server.CreateObject("Access.Application")
objAcc.Visible=true  'or false'
objACC.OpenCurrentDatabase "d:\webdb\steelers.mdb"
objAcc.DoCmd.RunMacro "Macroname"
objAcc.CloseCurrentDatabase
Set objAcc=Nothing%>
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question