Announcement

Collapse
No announcement yet.

Question about Application/Process control

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Question about Application/Process control

    Jon:

    Is it possible to shut down Homeseer, then open up Microsoft Access and compact the database, then Restart Homeseer with this program. For some reason I am having a problem with Homeseer locking up my Access Database and I was thinking that if I could shut down Homeseer with this program it would release Microsoft Access, then I could restart Access with this target:

    "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\Program Files\Homeseer 2\data\hstv\hstv.mdb" /compact

    After doing that, I would like to restart Homeseer.

    By compacting the database it corrects my issue with Homeseer and Access.

    Any suggestions would be appreciative

    Thanks,
    Steve

    #2
    One method could be to use a program like "startup delayer".

    You would have HS re-boot the computer, on startup you would have startup delayer call the access db compact routine, and then start HS after a preset delay.

    The program is freeware and can be found here http://www.snapfiles.com/get/startdelay.html

    Neil
    Running HS PRO V2.5.0.49 & HS Pro V2.5.0.51

    Comment


      #3
      The HomeSeer database is locked very frequently while HomeSeer is running. Trying to gain access to it while it is running is dangerous and could result in your devices and events not being saved -- and I do mean the plural of the form -- there are times when individual devices or events are saved, but often the entire set of devices or events is saved, and interrupting that by another program having gained access to the database could cause serious data trouble. Also, when a save is done HomeSeer uses data sets, which means that changes are made in memory and then the changes are written to the database. Here too, changes to the database at the wrong time can cause the database information to be different enough that the entire procedure fails.

      If HomeSeer is not shut down properly, or if there is a database structure issue, the compact & repair procedure is done by HomeSeer automatically.

      You should only access the database when HomeSeer is not running.
      Regards,

      Rick Tinker (a.k.a. "Tink")

      Comment


        #4
        Rick,

        he is talking about the hstv database, not the HS. Either way with the procedure i mentioned HS would not be running when the db maintenance was run.

        Neil
        Running HS PRO V2.5.0.49 & HS Pro V2.5.0.51

        Comment


          #5
          Unfortunately not...

          If you download sleep.exe (which is part of the resource kit for most versions of windows), you could use a simple batch file to do this i.e.

          Sleep.exe 45
          "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\Program Files\Homeseer 2\data\hstv\hstv.mdb" /compact
          Sleep.exe 180
          "C:\Program Files\Homeseer 2\Homeseer.exe"


          To run this bat, just create an event to run the batch file and also a script statement:

          &hs.shutdown


          The first 45 second delay in the batch file is there to allow Homeseer to shutdown. The 180 second delay (or whatever is required ) is there to allow Access to compact the database and then Homeseer will restart.

          Not tested but should work
          Jon

          Comment


            #6
            You can do this with the Script Connector plugin.

            There is a script available to shutdown and restart homeseer. I think you just need to insert the command to compact the database at the right place.
            --
            stipus

            Comment


              #7
              Rick:

              It is what Neil said, Not the Homeseer database. For some reason the HSTV database is locking and I can't compact it unless it is unlocked from Homeseer.

              Jon00 & Neiltimms: I will try this tonight when I get home. I will let you know how it works.

              Everyone else, thanks for the advice.

              Steve

              Comment


                #8
                Neil:

                Thanks!!!!

                Startdelay worked like a charm. Just what I needed and really simple to configure.

                Thanks again,
                Steve

                Comment

                Working...
                X