Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



How to execute or run SQL scripts in Access

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 29-07-2009
Member
 
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....

Reply With Quote
  #2  
Old 29-07-2009
Member
 
Join Date: May 2008
Posts: 2,001
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.
Reply With Quote
  #3  
Old 29-07-2009
Member
 
Join Date: May 2008
Posts: 2,283
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.
Reply With Quote
  #4  
Old 29-07-2009
Member
 
Join Date: Oct 2005
Posts: 2,385
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 03:33 AM.