none
how to compress access 2003 database file ?

    Question

  • hi

    i try this in access 2007 and its work excellent !!!

    but in access 2003 it dosent work

    what can be the problem ?

    public string Office2003 = @"C:\Program Files\Microsoft Office\Office11\msaccess.exe";
    public string Office2007 = @"C:\Program Files\Microsoft Office\Office12\msaccess.exe";
    ProcessStartInfo MSAccessInfo = new ProcessStartInfo();
    MSAccessInfo.FileName = Office2003;
    MSAccessInfo.Arguments =  Application.StartupPath + @"\Mydb.mdb /excl /compact ";
    MSAccessInfo.CreateNoWindow = false;
    MSAccessInfo.WindowStyle = ProcessWindowStyle.Hidden;
    Process.Start(MSAccessInfo);
    Thursday, August 05, 2010 1:47 PM

Answers

  • I would suggest that you start the command at the commandline. Or comment out / remove the "MSAccessInfo.CreateNoWindow = false;" so you see the result.

    If both Access Versions are installed: Maybe there is a conflict if the other access version is still running in the background?

    In some other Thread where you asked about the "hiding" of Access doing something, I mentioned the WindowStyle Property. Maybe it can be a good idea to have a look at it, because that way you can tell that the application window should be  hidden or minimized. (Something I would prefer because I could unhide it or put it in the foreground to see what is happening.)

    I hope this helped a little.

    With kind regards,

    Konrad

    Thursday, August 05, 2010 2:15 PM

All replies

  • What is the error message? Does it work if you call it manually? Maybe it is a Access 2007 datbase so Access 2003 is not compatible?

    And please stop multiple posts. I find that annoying. Thank you.

    With kind regards,

    Konrad

    Thursday, August 05, 2010 1:56 PM
  • there is not an error message, the program stuck (not respond...)
    Thursday, August 05, 2010 2:03 PM
  • I would suggest that you start the command at the commandline. Or comment out / remove the "MSAccessInfo.CreateNoWindow = false;" so you see the result.

    If both Access Versions are installed: Maybe there is a conflict if the other access version is still running in the background?

    In some other Thread where you asked about the "hiding" of Access doing something, I mentioned the WindowStyle Property. Maybe it can be a good idea to have a look at it, because that way you can tell that the application window should be  hidden or minimized. (Something I would prefer because I could unhide it or put it in the foreground to see what is happening.)

    I hope this helped a little.

    With kind regards,

    Konrad

    Thursday, August 05, 2010 2:15 PM
  • Hi E_gold,

     

    Welcome to MSDN Forum!

     

    I think we need to follow Konrad Neitzel.

    And, I also suggest you to execute this command in the command line first. If it can execute without any problems, then you can execute it in C#. Then let us know if the execution in C# is also has the problem.

     

    If these steps have generated any message, please show us, and then we can help you easier.

     

    If there’s anything unclear please feel free to let me know, and I’m glad to help you.

     

    Regards,

    Mike

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

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to the others community members reading the thread.

    Tuesday, August 10, 2010 9:05 AM
    Moderator