[Webinar] Streamline your web hosting managementRegister Today


Open Access db through command line

Posted on 2008-02-05
Medium Priority
Last Modified: 2013-11-30
My objective is to create a DTS task execute process task that will open Access db and once the access db is open it will automatically execute AutoExec macro.
Can you tell me How to open an access database through command line/.bat file ?
How to call that .bat file in my DTS ?
Question by:Syd2008
  • 2

Assisted Solution

digital_thoughts earned 1400 total points
ID: 20827632
Take a look at http://support.microsoft.com/kb/209207

"C:\Program Files\Microsoft Office\Office\msaccess.exe" "C:\Program Files\Microsoft Office\Office\samples\northwind.mdb"
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 600 total points
ID: 20827668
what  exactly are you trying to do?

copy this in a notepad and save as .bat

c:\program files\Microsoft office\office11\msaccess c:\folder\xxx.mdb /X MacroName

normally you can run a .bat file using Scheduled Task not sure about DTS


Accepted Solution

digital_thoughts earned 1400 total points
ID: 20827762
To clarify on my prior post, in DTS, create a new "Execute Process Task", in the Win32 process textbox, enter/browse to your path to Microsoft Access, will depend on version of Office you have. Then in the parameters textbox, enter the full database path in quotes (i.e. - "C:\Program Files\Microsoft Office\Office\samples\northwind.mdb")

Author Comment

ID: 20828060
I create a "execute process task"
and in Win32----->browse to my access db.mdb

when I try to execute this task its giving me an error msg: general error-2147024703(800700c1) any idea why I am getting this error ?

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Microsoft provides a rich set of technologies for High Availability and Disaster Recovery solutions.
A quick solution showing how to control and open a POS Cash Register Drawer using VBA with MS Access.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Suggested Courses

612 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