Results 1 to 3 of 3
  1. #1
    Irwell is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    6

    Trigger Access query via ADO in VBS file

    Hi everyone... I have a VBS script file which is used to perform scheduled tasks against data in an Access database. The machine the script is installed on has only got the runtime version of Access on it. Is there an easy way to call a query contained within the database from the VBS script via ADO? At present I am executing the SQL directly from the script, but I want to be able to modify the SQL from in Access and have the new version trigger without having to go in and edit my VBS file. I'm sure it should be fairly simple to achieve and I know how to do it from inside Access with VBA, I just can't seem to find similar functionality in ADO.

    Any help would be much appreciated!

    Edit: I know how to do it through DAO, but I don't want to have to rewrite the whole script.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Not really understanding what you are asking for. You have a working VBScript? Why would modifying SQL (a query?) require editing the VBScript? Why would converting to DAO require a lot of modification in the VBScript?

    Could you post the VBScript code?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Irwell is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    6
    Unfortunately I can't post the code as I don't have access to it at the moment. I am working with a VBScript with SQL hard coded into it to save the recordset into another table in the database (my extract query from my previous question in one scenario). I have a query built into the database itself which performs exactly the same SQL, but I'm not sure how to trigger that query via ADO. I know I can trigger it via DAO but the script does a fair bit of additional manipulation and to be honest I'd rather not rewrite it.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Creating Batch File Running Access Query
    By tcheck in forum Access
    Replies: 1
    Last Post: 12-20-2012, 01:50 PM
  2. Replies: 2
    Last Post: 12-22-2011, 07:53 PM
  3. Replies: 4
    Last Post: 04-07-2011, 04:38 PM
  4. Replies: 1
    Last Post: 09-27-2010, 10:10 AM
  5. date trigger
    By hyperionfall in forum Access
    Replies: 1
    Last Post: 08-08-2010, 01:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums