Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Compacting Database

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

    Compacting Database

    I've decided I should compact the database. The application came from Alpha 5 V5 and as far as I know was never compacted for 10 years! (I know, I know).

    So now that I've got the data in V11, what will happen when I compact? Should I?

    Also, I looked for the compact command per help :

    Open a database Control Panel.
    Close all forms, operations, and such. Alpha Five cannot perform a compact operation on tables with open forms.
    Select File > Compact Database. Alpha Five completes the Compact Database Operation.

    I don't see a COMPACT DATABASE option. I do see a COMPACT WORKSPACE option. That wouldn't seem to be the same.
    Should I COMPACT before I PACK? What's the difference?

    #2
    Re: Compacting Database

    That wouldn't seem to be the same.
    Yes, it is. New terminology. Default but changeable at View menu, Settings, Preferences, Terminology.

    See the documentation for Compacting the Database (more than quoted here)

    When designing forms and reports, the size of the data dictionaries (the DDD and SET files) grows over time as you continue to make edits to the objects in your database. It is a good practice to periodically remove the extra bulk by compacting the database.

    The Database Compact command packs all tables and compresses the data dictionary files. You can check the size of the database before and after compacting to see the file size reduction. You can also select to compact the database when you back it up.
    There can be only one.

    Comment


      #3
      Re: Compacting Database

      Okay, but I'm not clear as to the difference in PACKING a database and COMPACTING. FILE>WORKSPACE COMPACT as opposed to RIGHTclick>UTILITIES>PACK.

      Comment


        #4
        Re: Compacting Database

        You can't pack a database, only a table or set. Packing a table or set doesn't affect the data dictionaries, only the table and index files.
        There can be only one.

        Comment


          #5
          Re: Compacting Database

          Originally posted by Stan Mathews View Post
          You can't pack a database, only a table or set. Packing a table or set doesn't affect the data dictionaries, only the table and index files.
          Eh, yea, I still say that but I mean a table. But what is PACK and what is COMPACT. Both are available. I notice there are lots of old files in the folder ($xxxx). Can I delete or is there a procedure to distil that?

          Comment


            #6
            Re: Compacting Database

            Both are available
            But are separate and distinct. Thus the two menu choices. Compact database packs all Alpha files, not just tables and indexes. When your database is finished and users are actually using it, compact database is no longer necessary. Packing tables to remove deleted records may be.


            Can I delete or is there a procedure to distil that?
            Both. No different from V5.

            This message board has a search feature. I found this..........pertinent.
            Last edited by Stan Mathews; 02-13-2013, 11:01 PM.
            There can be only one.

            Comment


              #7
              Re: Compacting Database

              I did both and everything seems stable. But in an effort to keep the folder as sparse as possible, can certain files be removed? For example $$2112u0.DDD, or $$*.DDX, $$*.DDM, etc. What does the $$ indicate? Is there a function or choice I can make to dispose of files that are no longer needed and simply clutter up the design.

              Everyone has been very helpful on the forum, and I appreciate that.

              Comment


                #8
                Re: Compacting Database

                First: make a complete backup of the whole directory!!!
                Then delete the files like the ones above
                Then run your app to be sure no harm was done.
                I suspect you will not need those, but with the backup, you could replace them if needed.
                Dave Mason
                [email protected]
                Skype is dave.mason46

                Comment


                  #9
                  Re: Compacting Database

                  What does the $$ indicate?
                  Did you follow the link I provided?


                  Is there a function or choice I can make
                  Did you try using the search feature of the message board? I found the thread below.

                  http://msgboard.alphasoftware.com/al...ght=remove+mpx
                  There can be only one.

                  Comment


                    #10
                    Re: Compacting Database

                    Originally posted by Stan Mathews View Post
                    You can't pack a database, only a table or set. Packing a table or set doesn't affect the data dictionaries, only the table and index files.
                    Yes, a database can be compacted. Matter of fact, that's the only compact operation and has always been that way. If there is an error in a table, a message will appear saying ??? table cannot be compacted. Do you want to continue (with the compact)?
                    TYVM :) kenn

                    Knowing what you can achieve will not become reality until you imagine and explore.

                    Comment


                      #11
                      Re: Compacting Database

                      Good suggestions all! I did do a search but my questions weren't quite enough to satisfy me. Ken, I know you didn't write the response to Stan--your dog did:-) And Stan, I know what you mean about the tables are being compacted but I always consider a set of tables and their indexes as a database. I was hoping that compacting a work space would be like cleaning up a folder + compaction of the tables. I would be nice if there were a function to do this and automatically blow off the temp tables and optionally the searches just to keep the 'database' tidy. Thanks all.

                      Comment


                        #12
                        Re: Compacting Database

                        I was hoping that compacting a work space would be like cleaning up a folder + compaction of the tables. I would be nice if there were a function to do this and automatically blow off the temp tables and optionally the searches just to keep the 'database' tidy.
                        I don't know what a database (I don't like the term 'workspace' because a work space means many things whereas 'database' is specific.) compact actually does clean, remove but by virtue of the name, I suspect it at least compacts the files much like compacting a hard drive. I do know that the desktop is subject to a lot of fragmented files in one folder or another and after even a few minutes, one can get weird things to tings that don't work as they should. A database compact usually clears up or cleans out the weird happenings, at least for me. Whe it doesn't, then I go looking for the gremlins, usually left by someone else's dog.

                        There is an action script you can put on a button to do a database compact. Well, there used to be one in the Database Utilities (Workspace Utilities). There is a Pack Tables feature but that's not the same. There really should be an action script for this.

                        Put this on a button and it will do a compact of either a workspace or a database.

                        a5_databasecompact(.F.)

                        The caveat is that it will not compact the table on which the form is based but would if the form was closed, which makes sense because it has to have complete access to the table. So, if one wants to do a compact from a button on a form, you'll have to put up with the message box which will pop up.
                        Last edited by forskare; 02-17-2013, 12:41 PM.
                        TYVM :) kenn

                        Knowing what you can achieve will not become reality until you imagine and explore.

                        Comment


                          #13
                          Re: Compacting Database

                          Yes, a database can be compacted. Matter of fact, that's the only compact operation and has always been that way. If there is an error in a table, a message will appear saying ??? table cannot be compacted. Do you want to continue (with the compact)?
                          Ken, your eyes must be as bad as mine. I never said a database can't be compacted. I said it can't be packed. They are two different things.
                          There can be only one.

                          Comment


                            #14
                            Re: Compacting Database

                            No, Stan. My eyes are WORSE than yours. I knew I should have removed the blinders fro last night sleep. Sorry.
                            TYVM :) kenn

                            Knowing what you can achieve will not become reality until you imagine and explore.

                            Comment


                              #15
                              Re: Compacting Database

                              To make this even a little clearer - maybe....

                              There are two basic "packing" things that can be done:
                              (1.) A table can be packed - which will also result in rebuilding the indexes because removing records means that indexes must be rebuilt.
                              (2.) The A5 application files (.dd*, .se*, .al*) can be compacted. This removes some old records in these files (you could say it "packs" them) and also cleans up some other things. Thus the only reason this is referred to as "compacting" is because of the "other things" in addition to removing deleted records. Note that "removes some old records in these files " does NOT mean removing any of your data records - only old "application records" that are in the .dd*, .se*, and .al* files as a result of editing and deleting various layouts, operations, scripts, and functions.

                              The "Pack" routines do #1.
                              The built-in Database Compact (now the Workspace Compact) routine does both #1 and #2.

                              If you want to, you can use the Dictionary.Update() command to simply compact the application files - #2 above. This is MUCH faster than a full Database Compact because it does not rebuild all the indexes - which probably don't need to be rebuilt anyway. Of course, you will have to write your own function to do this for all the files - or anyone that has my AIMS_Grab_Bag already has a function that does it.

                              Comment

                              Working...
                              X