Solved

Create MS Access Macro to 'Kick-off' SQL Sched. Task

Posted on 1998-10-14
4
263 Views
Last Modified: 2012-08-13
I need to 'kick-off' a scheduled task (or ISQL script) in MS SQL Server from users' desktops that have Access 97.  Can a macro in Access do this?
Please give example.  SQL Server is 6.5.
0
Comment
Question by:snydero
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
spiridonov earned 100 total points
Comment Utility
It depends on the type of the sheduled task. If you can put all , what your task does into a stored procedure, you can create pass-through query in Access, that will execute this stored procedure  and then use macro to run this pass-through query. If you need help on creating pass-through query, add a comment and I 'll explain further.
0
 
LVL 1

Author Comment

by:snydero
Comment Utility
Yes I can put it all into a stored procedure.  How do I create a pass-through query?
0
 
LVL 7

Expert Comment

by:spiridonov
Comment Utility
Create new query in Access, when prompted don't select any tables. Go to Query Menu, choose SQL-specific-Pass-through. You will be taken to SQL code window. Type the following code:
"EXECUTE your_procedure_name"
Go to query properties , ODBC Connect str and click on Build button , you will be prompted with standard odbc datasource dialog. Select datasource you wish to connect to,enter user name and password. Close and save the query. Now  you can run the query from database window or macro and it will execute your stored procedure.
0
 
LVL 1

Author Comment

by:snydero
Comment Utility
Thanks.  Can the output (log) of a SQL script be routed to a log file on the server, or back to the user that initiated the stored procedure?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now