Results 1 to 4 of 4

Thread: How to execute or run SQL scripts in Access

  1. #1
    Join Date
    Feb 2009
    Posts
    55

    How to execute or run SQL scripts in Access

    hello friends,

    I am aware that it is possible to view SQL versions of queries, but I want to know whether there is a way to run SQL scripts in Access ? If possible, where can I find the syntax to execute or run SQL scripts in Access ?

    Any ideas....

  2. #2
    Join Date
    May 2008
    Posts
    2,012

    Re: How to execute or run SQL scripts in Access

    I don't know to execute SQL scripts in Access. But however you can try these four workarounds :

    • Export data to an SQL-based RDBMS > run the script > import back to Access.
    • Setup Access with ODBC and use an external ODBC-enabled SQL client to update the access date.
    • Use a text editor to batch and find/replace the script and put it in VBA format and then use that code in a Macro or Form action
      Code:
      statement = <line from text file>
      DoCmd.RunSQL(statement)
    • Write a VBA script that opens a file and executes each line of SQL.

  3. #3
    Join Date
    May 2008
    Posts
    2,297

    Re: How to execute or run SQL scripts in Access

    In the database,
    - Create a query in Design View and close the Show Table window.
    - From the menu bar, click View >> SQL View.
    - You can type and paste your SQL statements into this window.

    To add dynamic SQL as a command button on a form, you will need to build a VBA procedure.

  4. #4
    Join Date
    Oct 2005
    Posts
    2,393

    Re: How to execute or run SQL scripts in Access

    Well, the Jet Engine Access supports some SQL functions, but I don't know which ones are supported and which ones are not.

    Eventhough, Access supports a wide variety of database engines; you don't have to use the Jet engine if you need a more versatile back-end. You can connect to an Oracle database.

Similar Threads

  1. How to execute scripts in Kaspersky
    By Aspen in forum Networking & Security
    Replies: 2
    Last Post: 20-10-2009, 12:44 PM
  2. Why some scripts start with #
    By New buDDy in forum Operating Systems
    Replies: 3
    Last Post: 14-10-2009, 09:44 PM
  3. How to execute Server.Execute function in ASP.NET (C#)
    By RasMus in forum Software Development
    Replies: 3
    Last Post: 25-09-2009, 12:30 PM
  4. Scripts are usually safe. Do you want to allow scripts to run ?
    By Ebadaah in forum Technology & Internet
    Replies: 4
    Last Post: 02-07-2009, 12:10 PM
  5. How to Run Shell Scripts ?
    By Denisez in forum Tips & Tweaks
    Replies: 1
    Last Post: 28-03-2009, 12:52 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,616,230.87267 seconds with 17 queries