Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: How to Open MS Access Databse connection
Topic Summary:
Created On: 01/25/2013 05:36 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 01/25/2013 05:36 AM
User is offline View Users Profile Print this message

Author Icon
ShailendraGupta
Student (5-19 posts)

Posts: 6
Joined: 01/25/2013

Hi all,

I have a MDB file and some macros are written there. One of the macro creates the file qry_Mod4_Step1_Export.xlsx which is imported by the Automate job.

Now my job is to open a Access connection, execute the macro and import the .xlsx file and then close that connection.

Can you please guide me through the process. Its Urgent.



 Category Survey
 01/25/2013 09:37 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Shailandra,
you can run a macro of an access mdb with a simple basic script as below

 Category Survey
AutoMate 7 version:
Windows version:



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 01/31/2013 10:43 PM
User is offline View Users Profile Print this message

Author Icon
ShailendraGupta
Student (5-19 posts)

Posts: 6
Joined: 01/25/2013

Thanks Jean for your valueable time and response. But I am facing some issue with the script.

While i am trying to run the above script i am getting this error -

"(7866)Microsoft Access can't open the database because it is missing, or opened exclusively by another user, or it is not an ADP file." at script line 2"

I want to share one thing with You that the extention of the mdb file is .accdb. 

Can You provide me some basic tutorial, as i am new to this 



 Category Survey
 02/01/2013 12:05 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Shailandra,
I tested my task with an accdb file, and it still works.
Are you sure you have the exact value pointing to your file in the mdbFile variable ?
Any error in that value, pointing to a non existing file provides the error you get, which is in fact misleading, since the message would better be "target file not found" or something like that.


 Category Survey
AutoMate 7 version:
Windows version:



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 02/01/2013 06:28 PM
User is offline View Users Profile Print this message

Author Icon
ShailendraGupta
Student (5-19 posts)

Posts: 6
Joined: 01/25/2013

Hi Jean,

Are there any other ways to do the above task?



 Category Survey
 02/01/2013 09:26 PM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Shailendra,
did you not finally succeed in having the script running OK ? This is definitely the simplest way.

The other way could be opening the Access db, and interfacing with it through the application menus via keystrokes, simulating the manual way. But it is far more unpractical than the script.

 Category Survey
AutoMate 7 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 07/18/2017 10:05 AM
User is offline View Users Profile Print this message

Author Icon
UrielGamez
Apprentice (20-49)

Posts: 24
Joined: 06/20/2007

Hi Jean,


I am running this open Access/run macro task. It has been working fine for months, but I am now getting this error.

This task is running in AM9

Script Error: "(2501) The RunMacro action was canceled" at script line 4

Any ideas?

Thank you,
Uriel

 Category Survey
AutoMate 7 version:
Windows version:


Edited: 07/18/2017 at 01:48 PM by UrielGamez
 07/19/2017 08:31 AM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hello,

Are you able to run the script successfully outside or AutoMate (but on the same machine that AutoMate is installed on)?

 Category Survey


-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 07/19/2017 02:19 PM
User is offline View Users Profile Print this message

Author Icon
UrielGamez
Apprentice (20-49)

Posts: 24
Joined: 06/20/2007

Hi,

Yes, the script runs successfully outside of Automate.

 Category Survey
AutoMate 7 version:
Windows version:
 07/20/2017 02:21 PM
User is offline View Users Profile Print this message

Author Icon
Alex Escalante
HelpSystems

Posts: 871
Joined: 02/26/2014

Hello Uriel,

Were there any changes done to the AutoMate software (upgrade, patch)?

If not, were there any changes to the environment around the time that the issue began?

 Category Survey
AutoMate 7 version:
Windows version:


-------------------------

Alex Escalante | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 07/21/2017 01:01 PM
User is offline View Users Profile Print this message

Author Icon
UrielGamez
Apprentice (20-49)

Posts: 24
Joined: 06/20/2007

No, there have not been any Automate updates or patches installed.

 Category Survey
AutoMate 7 version:
Windows version:
 07/21/2017 02:58 PM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Uriel,

A couple of things:

1. Please post your issue in the category that reflects the version of Automate you are running. If you are running v9, please post in the AutoMate 9 category. You can reference this threads URL in your thread. We do not want users that are running v7 to get confused with the troubleshooting we are doing here.
2. Please provice the tasks and/or script you are running in that other thread as well.
3. What version of AM9 are you running?
4. We do not normally troubleshoot VB scripts so we will do our best to assist you. Has the macro name changed since it functioned correctly?

Once a new thread has been opened with the relevant information requested above, we will be able to troubleshoot further.

 Category Survey
AutoMate 7 version:
Windows version:


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 07/27/2017 06:35 AM
User is offline View Users Profile Print this message

Author Icon
UrielGamez
Apprentice (20-49)

Posts: 24
Joined: 06/20/2007

Thank you.

I created a new post under AM9 section.

 Category Survey
AutoMate 7 version:
Windows version:
 12/03/2017 10:48 PM
User is offline View Users Profile Print this message

Author Icon
EdwardsPaul
n00b (>6 posts)

Posts: 3
Joined: 07/06/2017

I just want to share my experience regarding this particular Access Macros. When I have been using the macros and modules I rendered with this particular Access Macro errors “Action failed error: 2950”. I don’t have a pinch of knowledge on how to resolve this access damaged macros and module issue.

 

To fix this I have searched many sites and last but not the least I tried these few simple fixes mentioned in this post.  I got satisfied result and been able to resolve this issue. So, if you too facing similar issue then try the fix for sure.



 Category Survey
AutoMate 7 version:
Windows version:
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 991 guests browsing this forum, which makes a total of 991 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2018 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog