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

Adding fields corrupts table

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

    Adding fields corrupts table

    Hi,

    I've got A5 V4.5 and two very simple tables. 15 or so fields and a couple thousand records in each. Easy field rules, few saved operations, couple indexes, no xbasic. Can't get much simpler.

    I want to export some of the fields to a simple text file; open in word processor, a little editing, and print it. But I don't want all of each field.

    Since A5 won't export calculated fields, I tried to add a new character field, length 80, to each table. Figured I'd do an update to populate it, then export that field. The restructure seemed to go OK, nothing in the Violated table, but when I looked at the result, my memo fields were corrupt. Some were with the wrong record, others were truncated from the front, others were missing, and some were fine.

    I worked around it by creating a new, empty, table with same fields plus the new field. Restored the first table from my backup program and appended the records to the new table. Did the update to populate the new field, changed it to a calculated field so it will fill in automatically with any new records, created an export operation, ran it and got what I wanted.

    Why couldn't I add a field to the original tables? I believe the usual thing to watch out for in such a case is a corrupt record, but if I append all records to a new table, am I not appending the corrupt record as well? I guess I can't be, because the new table works.

    Any ideas? I'm stumped!

    Thanks,

    Gary

    #2
    RE: Adding fields corrupts table

    Gary,

    You might try searching this forum. I vaguely recall others reporting trouble when they tried to insert a new field in the middle of the field list during restructure. If memory serves, the recommendation is to add new fields at the bottom of the list. -- tom

    Comment


      #3
      RE: Adding fields corrupts table

      Gary,

      Tom is correct. If you add a field, add it to the bottom of the list. Then run all of your updates. This is especially true if you have used long names for field names. Names longer than 10 characters are saved in the data dictionary in what is essentially a memo field and referenced back to the original field position on the list. If you change the field order, this reference seems to get messed up.

      Now if you have added a field and saved the table structure, then you can go back and reorder the table. This seems to work reliably. I usually don't bother, since the order doesn't really matter.

      Another similar issue occurs if you have to delete a field. I have found that the only reliable way to delete a field and not have problems, is to move the field to the last in the list, save the new structure, reopen the structure, and then delete the field. I have not had any problems using this method. When I deleted fields from within the list, I did occasionally have corrupted data.

      I sometimes add and delete fields frequently during development. Using these rules and keeping the field names to 10 characters, I have not had any problems, even with memo fields.

      Jerry

      Comment


        #4
        RE: Adding fields corrupts table

        Tom and Jerry, (sorry!!)

        Thanks for the ideas, but ... the new field _was_ added to the bottom of the list. Its name was less than 10 characters, and none of the other field names are more than ten characters. Some are alphanumeric, if that matters?

        Gary

        Comment


          #5
          RE: Adding fields corrupts table

          Gary,

          Field names must begin with a letter, and can contain the characters A - Z, 0 - 9 and the underscore character _

          If you tried to add a field using a field name that began with a numeral, or contained other non-alpha characters perhaps that explains what happens.

          -- tom

          Comment


            #6
            RE: Adding fields corrupts table

            Nope. Field name was "printit". You don't suppose A5 chokes on the word "print" in a field name??

            Gary

            Comment


              #7
              RE: Adding fields corrupts table

              Most likely it is a corrupt record, but the easy way to tell
              is to create a duplicate, empty table, then restructure the
              empty table, and then append, 1/2 the records from the
              old table to the new table. If there is no corruption, then
              the error is in the second half of the records; if there
              is corruption, start over and bring over only 1/4 of the records, etc.

              Comment


                #8
                RE: Adding fields corrupts table

                Thanks, Peter,

                I had considered the possibility of a corrupt record, but was put off by the task of digging out the one of 4000. I never thought of bringing in half, then half again, and so on. When I get a chance, I'll give that a try.

                When all else fails, try the simple stuff!

                Gary

                Comment

                Working...
                X