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

x
?
Solved

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

Posted on 1998-10-14
4
Medium Priority
?
297 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
[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
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
Victor Spiridonov earned 300 total points
ID: 1090565
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
ID: 1090566
Yes I can put it all into a stored procedure.  How do I create a pass-through query?
0
 
LVL 7

Expert Comment

by:Victor Spiridonov
ID: 1090567
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
ID: 1090568
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

636 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