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

Confued by Database Compact error message ...

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

    Confued by Database Compact error message ...

    I run Database compact at least several times per day. Sometimes I get an error message of the sort:

    Could not update:
    Tablename
    Would you like to continue?

    I have looked at the data of this table and cannot find any obvious problem. I can append the data to a new table and the new table is fine (no problem when run Database compact). I can copy the data to a new table and the new table also has no problem. But, if I empty the errant table, it still gives the error message when Database Compact is run, leading me to think the problem may not be with the data, but with an index or dictionary. How can I determine the cause, and more importantly, how can I fix it?

    Thanks in advance ...

    Gary
    Gary S. Traub, Ph.D.


    #2
    RE: Confued by Database Compact error message ...

    The table may be open (as in, in memory) even thought you don't think it is. Try restarting A5 before doing the compact and see if you get the same message.

    Russ

    Comment


      #3
      RE: Confued by Database Compact error message ...

      Hi Russ,

      Thanks for the input - unfortunately, I already tried that - even reboooting - and does not help. Any other ideas?

      Gary
      Gary S. Traub, Ph.D.

      Comment


        #4
        RE: Confued by Database Compact error message ...

        A while back I had problems compacting a database, tried everything. Jerry Brightbill suggested recreating the database. I copied over all the code added the tables and it solved the problems. It was actually easier than I had anticipated.

        Russ

        Comment


          #5
          RE: Confued by Database Compact error message ...

          Gary

          There are really 2 main reasons you can't compact a table. Either the table is open somewhere or the table data dictionaries are badly corrupted. Sometimes running the compact from the menu distorts that, since it also packs and reindexes, but if you compact with dictionary.update() that only compacts the data dictionaries. Typically, a failed compact has nothing to do with any data problems. Bad data usually will show up with index issues, fetch problems, or packing errors.

          Unfortunately, if the failed compact is from corruption, your options are limited. My first choice would be to duplicate the table with data, but no data dictionary info (forms, layouts, etc) Try compacting that. It should compact easily, since with an empty data dictionary, there is nothing to compact. Then one by one, copy forms and other layouts from the old table to the new one. Compact after each addition. When compact fails, you will know where the corruption exists. If you get everything copied and it still compacts, delete the original and duplicate the copy back to the original name will all elements.

          I have seen corruption so bad, the only solution was to start over and completely rebuild. Not much fun and something you only want to do once. Regular compacting an saving series of backups will become normal behavior.

          Jerry

          Comment


            #6
            RE: Confued by Database Compact error message ...

            Russ and Jerry,

            Problem solved, but here is how I did it:

            Starting with Jerry's suggestion to duplicate the table, but instead of just copying the data (without layouts and field rules), I copied everything. Then ran Database Compact - the original table still caused an error, but the new table did not. So, I then moved the errant table and its associated files to a safe area on my hard drive. Then renamed the new table to the name of the old table. Ran Database COmpact and ... works fine! Tested the application, and all is well. Thanks guys!!

            Gary
            Gary S. Traub, Ph.D.

            Comment


              #7
              RE: Confued by Database Compact error message ...

              Actually, I still have the same problem.

              The problem table is called progressnotes. If I run Database Compact, I get the errors as I described above.

              I then used Duplicate to create an exact copy of progressnotes (copying all components: records, indexes, dictionary, field rules) and called it progressnotes_new. I then removed progressnotes from the database. Then ran database compact and there is no error message, i.e., progressnotes_new caused no problem. So now, thinking I was just one step away from a solution, I renamed progressnotes_new to progressnotes. Then ran Database Compact, and again I get the error message ????

              How can just the name of the table be causing this error. I am very confused. And I certainly would rather not rebuild this entire module because it has been developed over quite some time, and was working flawlessly. Any ideas?

              Gary
              Gary S. Traub, Ph.D.

              Comment


                #8
                RE: Confued by Database Compact error message ...

                Gary

                I suspect there is something in the code that references the name with the problem. If the cause was some old corruption, it may be very difficult to find. The easy solution is the obvious, rename the table.

                Another possibility that should be tried is to drop the table from the database, close A5 and reopen, compact, close and reopen and try to create a new table with the same name and see what happens. You will have to move the old table to another directory temporarily to not overwrite it. If a new table of the same name fails, I would just go back to the solution of renaming.

                Jerry

                Comment


                  #9
                  RE: Confued by Database Compact error message ...

                  Or, copy the problem table and its dictionaries to new directory.Then create a new database in that directory and add that table.Then compact.If it compacts OK then problem may reside in database ( adb ) itself.
                  Then you could rebuild a new database and add all sets and tables.

                  Comment


                    #10
                    RE: Confued by Database Compact error message ...

                    Gary,

                    Try compacting the troblesome table only. If you need the script, I'll post it (again).

                    Peter
                    Peter
                    AlphaBase Solutions, LLC

                    [email protected]
                    https://www.alphabasesolutions.com


                    Comment


                      #11
                      RE: Confued by Database Compact error message ...

                      Plase post it since I have the same problem
                      Thanks
                      Jim

                      Comment


                        #12
                        RE: Confued by Database Compact error message ...

                        Here it is:
                        (BTW: I sometimes compact shadow tables, then copy them to the server. Don't try this in your own home unless accompanied by a genuine Alphaholic.)
                        [b]
                        'Date Created: 21-Oct-2003 03:06:33 PM
                        'Last Updated: 21-Oct-2003 03:06:33 PM
                        'Created By : PG
                        'Updated By : PG
                        'Perform maintenance (compact) on the selected dictionary.
                        '-----------------------------------------------
                        IF a5.Get_Master_Path() "" ''then the shadow database is running
                        vChoice = ui_get_radio("Select Master or Shadow for Dictionary Update",1,"Master","Shadow")
                        SELECT
                        CASE vChoice = "Master"
                        vPath = vDBF_Path

                        CASE vChoice = "Shadow"
                        vPath = a5.Get_Path()

                        CASE vChoice = ""
                        End
                        END SELECT
                        ELSE
                        vPath = vDBF_Path
                        END IF

                        vFilename = ui_get_file("Dictionary to Update", "table(*.DDD)|set(*.SET)|application(*.ALB)",vPath+CHR(92),"X")

                        IF vFilename = "" THEN
                        END
                        END IF

                        ''NEED TO GET FILE SIZE OF DDD/DDM BOTH or SET/SET or ALB/ALM
                        Select
                        Case FILE.FILENAME_PARSE(vFilename,"e") = ".ddd"
                        vFileOtherExtension = ".ddm"

                        Case FILE.FILENAME_PARSE(vFilename,"e") = ".set"
                        vFileOtherExtension = ".sem"

                        Case FILE.FILENAME_PARSE(vFilename,"e") = ".alb"
                        vFileOtherExtension = ".alm"
                        End Select

                        vPreFileSize1 = FILE.SIZE(vFilename)
                        vPreFileSize2 = FILE.SIZE(FILE.FILENAME_PARSE(vFilename,"DPN") + vFileOtherExtension)
                        dictionary.update(vFilename)
                        vPostFileSize1 = FILE.SIZE(vFilename)
                        vPostFileSize2 = FILE.SIZE(FILE.FILENAME_PARSE(vFilename,"DPN") + vFileOtherExtension)

                        vPreFileSize = vPreFileSize1 + vPreFileSize2
                        vPostFileSize = vPostFileSize1 + vPostFileSize2

                        vDiff = (1 - (vPostFileSize/vPreFileSize))*100

                        Msg1 = vFilename + chr(13) + "Table Compacted" + chr(13) + \
                        "Original FileSize = " + Ltrim(str(vPreFileSize)) + chr(13) + \
                        "Comapcted FileSize = " + Ltrim(str(vPostFileSize)) + chr(13) + \
                        "Diff. = " + str(vDiff,4,1) + "%"

                        ui_msg_box("Database Dictionary Update",Msg1,UI_INFORMATION_SYMBOL)

                        END
                        Peter
                        AlphaBase Solutions, LLC

                        [email protected]
                        https://www.alphabasesolutions.com


                        Comment


                          #13
                          RE: Confued by Database Compact error message ...

                          Thanks. I'll try it tomorrow
                          Regards
                          Jim

                          Comment


                            #14
                            RE: Confued by Database Compact error message ...

                            Thanks Peter ...

                            Gary
                            Gary S. Traub, Ph.D.

                            Comment


                              #15
                              RE: Confued by Database Compact error message ...

                              Oops!

                              vDBF_Path is a global variable I use. The script won't work unless you put this as the first line:
                              [b]
                              vDBF_Path = iif(:A5.Get_Master_Path()=="",:A5.Get_Path(),:A5.Get_Master_Path())
                              Peter
                              AlphaBase Solutions, LLC

                              [email protected]
                              https://www.alphabasesolutions.com


                              Comment

                              Working...
                              X