Compact BE while idle... so confused!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • perryche@yahoo.com

    Compact BE while idle... so confused!

    I have searched the site and probably came across dozens of posts... I
    am somewhat confused about the replies... here is my situation, see if
    someone can point me to where to go:

    I have splitted up the DB to FE and BE, I want to autocompact BE when:
    1. all users exited FE (or if not out by certain time of the day and it
    is idle (forgot to logout), force them out of it to do a compact)
    or
    2. Last person out of accessing the BE (FE exited)

    Thanks in advance,
    Perry

  • DFS

    #2
    Re: Compact BE while idle... so confused!

    perryche@yahoo. com wrote:
    I have searched the site and probably came across dozens of posts... I
    am somewhat confused about the replies... here is my situation, see if
    someone can point me to where to go:
    >
    I have splitted up the DB to FE and BE, I want to autocompact BE when:
    1. all users exited FE (or if not out by certain time of the day and
    it is idle (forgot to logout), force them out of it to do a compact)
    or
    2. Last person out of accessing the BE (FE exited)
    You'll have to build your own programs and auditing tools to do this.
    You'll need to have Access security turned on, or have your own custom
    security/login system in place. You'll need to track when each person logs
    in and out - checking for the last person logging out will be probably be
    done via a hidden form in the FE. When the last person logs out, your
    hidden form can start a BE compact operation. Or you can leave a separate
    Access or other .exe running and poll the logged in/out table from outside
    the FE.

    Not sure about forcing someone out of an app. You can probably find other
    cdma posts about it.


    Thanks in advance,
    Perry

    Comment

    • pietlinden@hotmail.com

      #3
      Re: Compact BE while idle... so confused!

      Not sure about forcing someone out of an app. You can probably find other
      cdma posts about it.
      Arvin wrote something that does that. KickEmOut
      Database Consulting, Business Computer Solutions in Orlando, FL MCP, MVP, Networking, Computers, consulting


      Comment

      • perryche@yahoo.com

        #4
        Re: Compact BE while idle... so confused!

        Thank you all for replying. I took pietlin's advice and make it work
        pretty well. The only situation is if someone is still in a form,
        then, I may not be able to force them out. Thanks again.

        Perry

        Comment

        • pietlinden@hotmail.com

          #5
          Re: Compact BE while idle... so confused!


          perryche@yahoo. com wrote:
          Thank you all for replying. I took pietlin's advice and make it work
          pretty well. The only situation is if someone is still in a form,
          then, I may not be able to force them out. Thanks again.
          >
          Perry
          Why not? You'd force them out by looping through the front end forms
          collection (the open forms) and closing each one. You could be nice
          and prompt the user for saving the record or leaving it. The polling
          in the frontend of the backend table will tell you when it's time to
          boot everyone out.

          Comment

          • Lyle Fairfield

            #6
            Re: Compact BE while idle... so confused!

            pietlinden@hotm ail.com wrote:
            perryche@yahoo. com wrote:
            Thank you all for replying. I took pietlin's advice and make it work
            pretty well. The only situation is if someone is still in a form,
            then, I may not be able to force them out. Thanks again.

            Perry
            >
            Why not? You'd force them out by looping through the front end forms
            collection (the open forms) and closing each one. You could be nice
            and prompt the user for saving the record or leaving it. The polling
            in the frontend of the backend table will tell you when it's time to
            boot everyone out.
            Why force them out? What does this accomplish?

            Comment

            • perryche@yahoo.com

              #7
              Re: Compact BE while idle... so confused!

              Lyle,
              Well, the reason is for routine maintenance if someone else forgot
              to logout of database, then, you can not compact it.

              Perry

              Lyle Fairfield wrote:
              pietlinden@hotm ail.com wrote:
              perryche@yahoo. com wrote:
              Thank you all for replying. I took pietlin's advice and make it work
              pretty well. The only situation is if someone is still in a form,
              then, I may not be able to force them out. Thanks again.
              >
              Perry
              Why not? You'd force them out by looping through the front end forms
              collection (the open forms) and closing each one. You could be nice
              and prompt the user for saving the record or leaving it. The polling
              in the frontend of the backend table will tell you when it's time to
              boot everyone out.
              >
              Why force them out? What does this accomplish?

              Comment

              • Lyle Fairfield

                #8
                Re: Compact BE while idle... so confused!

                perry...@yahoo. com wrote:
                Lyle,
                Well, the reason is for routine maintenance if someone else forgot
                to logout of database, then, you can not compact it.
                I have no idea where this idea came from but it is wrong (unless
                something has recently changed).

                A database (mdb) can be compacted if it can be opened exclusively. If
                no user is actively working in the database then it can be opened
                exclusively. A user simply having the front end open will not prevent
                the backend from being compacted. Given a reasonable number of users,
                say 20, there may be many times in a day when the beackend can be
                compacted without "kicking" anyone out.

                I can run the code from



                from db1 in which I have linked the tables of northwind.mdb while I
                have the db2, also with that tables of northwind.mdb linked, open.
                Northwind.mdb is compacted. I can't run it if db2 has a form open which
                is editing data from Northwind.mdb.

                I run the code on the front end's open which is likely to have the
                first user of the day compact the backend, or I run it on demand from a
                menu, with a reminder popping up every Friday to remind that it be run.

                Comment

                • perryche@yahoo.com

                  #9
                  Re: Compact BE while idle... so confused!

                  Lyle, Like you stated, when someone is still in the database, using the
                  form, I can not compact the BE. In fact, whenever I see a .ldb, then I
                  can not compact it. Unless an user exit the database, I can not
                  compact it. This has been my experience, but tell me if I am wrong.
                  How can I ensure everyone is out so that I can compact the BE if not
                  force them out? What if someone is in the form and forgot to exit and
                  left for the day, what option do I have then?

                  Thanks again,
                  Perry

                  Comment

                  • Lyle Fairfield

                    #10
                    Re: Compact BE while idle... so confused!

                    perryche@yahoo. com wrote:
                    Lyle, Like you stated, when someone is still in the database, using the
                    form, I can not compact the BE. In fact, whenever I see a .ldb, then I
                    can not compact it. Unless an user exit the database, I can not
                    compact it. This has been my experience, but tell me if I am wrong.
                    How can I ensure everyone is out so that I can compact the BE if not
                    force them out? What if someone is in the form and forgot to exit and
                    left for the day, what option do I have then?
                    >
                    Thanks again,
                    Perry
                    I'm sorry but I don't know what to say. I think my previous post
                    exhausted my input on this matter.

                    Comment

                    • John Mishefske

                      #11
                      Re: Compact BE while idle... so confused!

                      perryche@yahoo. com wrote:
                      Lyle, Like you stated, when someone is still in the database, using the
                      form, I can not compact the BE. In fact, whenever I see a .ldb, then I
                      can not compact it. Unless an user exit the database, I can not
                      compact it. This has been my experience, but tell me if I am wrong.
                      How can I ensure everyone is out so that I can compact the BE if not
                      force them out? What if someone is in the form and forgot to exit and
                      left for the day, what option do I have then?
                      The user doesn't have to necessarily exit the front-end app; the front-end app just has to
                      close all its connections to the back-end.

                      So Lyle's code checks if there are any open forms or reports under the assumption that
                      those forms/reports would be "bound" objects - thus holding an open connection to the data
                      store - the backend .mdb file - and exits the proc after informing the user.

                      As the developer you should know which forms/reports are bound objects and close them
                      before attempting this code. Without any bound objects (and nothing else holding an open
                      connection to the BE like a Public variable), the .ldb file disappears (also assuming no
                      other users have an open connection to the BE).

                      The proc still fails if another user holds a connection (i.e. the .ldb file exists) and
                      that is appropriate. You are attempting to find a particular condition where no users are
                      holding an open connection (and thus the .ldb locking file doesn't exist).

                      This would be one good reason to not to maintain an open-connection to the back-end
                      through a start-up form or the main menu/main form. (Lots of developers do that in that
                      hope that network performance is enhanced since an open connection exists from program
                      startup.)

                      --
                      '---------------
                      'John Mishefske
                      '---------------

                      Comment

                      • Lyle Fairfield

                        #12
                        Re: Compact BE while idle... so confused!

                        This would be one good reason to not to maintain an open-connection to the back-end
                        through a start-up form or the main menu/main form. (Lots of developers do that in that
                        hope that network performance is enhanced since an open connection exists from program
                        startup.
                        Do you do this John? I have never found that it made any difference at
                        all and so I have never done it. I know that this was recommended in
                        The Jet DataBase Programmers Guide 3.0 but that was a long time ago.
                        With the speed of processors and disk writes today the creation of a
                        tiny file is instantaneous.
                        In all honesty though I have never worked with a slow connection to the
                        backend.

                        Comment

                        • John Mishefske

                          #13
                          Re: Compact BE while idle... so confused!

                          Lyle Fairfield wrote:
                          >>This would be one good reason to not to maintain an open-connection to the back-end
                          >>through a start-up form or the main menu/main form. (Lots of developers do that in that
                          >>hope that network performance is enhanced since an open connection exists from program
                          >>startup.
                          >
                          >
                          Do you do this John? I have never found that it made any difference at
                          all and so I have never done it. I know that this was recommended in
                          The Jet DataBase Programmers Guide 3.0 but that was a long time ago.
                          With the speed of processors and disk writes today the creation of a
                          tiny file is instantaneous.
                          In all honesty though I have never worked with a slow connection to the
                          backend.
                          >
                          Yes but to be honest I don't think it really makes a noticeable difference although lots
                          of folks that I've recommended this to claim it "saved them". I'm sure you are correct;
                          with 100 Mb networks, switches and faster PCs than we used 10 years ago its hard to
                          believe this has significant performance impact.

                          My problems usually seem more related to either permissions or issues with 8.3 naming or
                          path length of the BE or some SMB/NetBEUI registry setting.

                          --
                          '---------------
                          'John Mishefske
                          '---------------

                          Comment

                          • David W. Fenton

                            #14
                            Re: Compact BE while idle... so confused!

                            "Lyle Fairfield" <lylefairfield@ aim.comwrote in
                            news:1153782553 .029579.168970@ b28g2000cwb.goo glegroups.com:
                            I can run the code from
                            >

                            >
                            from db1 in which I have linked the tables of northwind.mdb while
                            I have the db2, also with that tables of northwind.mdb linked,
                            open. Northwind.mdb is compacted. I can't run it if db2 has a form
                            open which is editing data from Northwind.mdb.
                            The form doesn't have to be editing. It only has to display data
                            from a table.

                            Anyone who is using a recordset to maintain a persistent connection
                            to the back end in order to improve performance of opening forms is
                            not going to ever be able to get an exclusive lock on the back end.

                            --
                            David W. Fenton http://www.dfenton.com/
                            usenet at dfenton dot com http://www.dfenton.com/DFA/

                            Comment

                            • David W. Fenton

                              #15
                              Re: Compact BE while idle... so confused!

                              John Mishefske <jmishefskeNO@S PAMyahoo.comwro te in
                              news:dAzxg.980$ zg.903@tornado. rdc-kc.rr.com:
                              This would be one good reason to not to maintain an
                              open-connection to the back-end through a start-up form or the
                              main menu/main form. (Lots of developers do that in that hope that
                              network performance is enhanced since an open connection exists
                              from program startup.)
                              There is a lot of overhead in the creation of the LDB file. In an
                              app with a small number of users, where it is often likely that a
                              user will be the first to open the back end, the persistent
                              connection can be very helpful, since otherwise, the LDB will be
                              repeatedly deleted and recreated as bound forms are closed and
                              opened.

                              --
                              David W. Fenton http://www.dfenton.com/
                              usenet at dfenton dot com http://www.dfenton.com/DFA/

                              Comment

                              Working...