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

Child records mix up

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

  • Child records mix up

    We are experiencing a serious issue. Every few days, child records get mixed up. For example an invoice loses line items to another invoice. Please see the attached pdf. There is no loss of data per say, it is as if the foreign key values in the child table are being changed. I restore the previous backup, compact it, update indexes, and manually add the missing invoices. After a day or 2 it happens again.
    Each station has its RT pointing directly to the file on the Server (no shadow).

    I am suspecting (just speculating) a hardware problem (hard to say when there are 9 users). Has anyone experienced something like this and what could be the probable cause(s). Thanks in advance.

  • #2
    Re: Child records mix up

    Gaby,
    Prior to restoring the backup, what do the indexes look like? Are they all as they are supposed to be IOW. Even if they look okay, does rebuilding them correct the issue (which indirectly you may be fixing the issue currently by replacing them with a backup)?

    Just a couple of thoughts.
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________



    Comment


    • #3
      Re: Child records mix up

      Hi Mike:
      I did check the indexes of the corrupted file and they seemed to be ok. I didn't try to rebuild them on the corrupted file. I just emptied the directory and restored the previous backup. We had someone check the network and connections a few days ago and all seemed fine.

      Comment


      • #4
        Re: Child records mix up

        I had the same thing happen on mine. The child records would be associated with the wrong parent. Seems like it would happen when editiing records. Somtimes a index rebuild would fix it, but not always. I don't know what caused it, but I had several child tables with the same field names and done away with that. I still have several child and granchild tables and they don't have the same field names anymore and haven't had that problem since I have changed.
        David
        A5V12.3
        Win7, 64 bit
        Qbks 2018 Enterprise
        QODBC R/W

        Comment


        • #5
          Re: Child records mix up

          Hi David
          Originally posted by David View Post
          Seems like it would happen when editiing records.
          Yes, the 1st symptoms started when a user said that she went back to change line items on her invoice.

          Originally posted by David View Post
          but I had several child tables with the same field names and done away with that. I still have several child and granchild tables and they don't have the same field names anymore and haven't had that problem since I have changed.
          Same here, I have several child tables +1 grand child table with a couple of fields that have the same name. I do hope that's the issue. I have 9 users ready to skin me and the owner is seriously considering dumping A5 and go back to Filemaker.

          Comment


          • #6
            Re: Child records mix up

            Hi Gaby,

            Similar issue here. I am still troubleshooting the issue. By accident I found something odd. I wanted to delete a suspect child record and the cursor happened to be in the wrong field when I pressed delete. Instead of deleting the record a different value showed up in that field. From the value I found, I could recognize that this had to do with the issue. When I actually removed that record and entered it again everything was fine again. The field is one of the key fields and happens to have the same name in header and detail table. I still have no solution for this issue but from what I have read I strongly believe that the user tries to change a record and that this is the cause of the problem.

            Regards,
            Jo Hulsen
            Dommel Valley Solutions
            The Netherlands

            Comment


            • #7
              Re: Child records mix up

              Gaby,

              I'm intrigued by your pdf (showing the RowId field values before and after).

              1) How did you produce it?

              2) Did you verify that the invid_fk field values actually changed in the child table?

              3) Could you add the link field values (before and after) to your pdf so we could see what (and how) they changed?

              4) In your set linkage did you have referential integrity enabled? (were changes and deletes being cascaded?)

              Comment


              • #8
                Re: Child records mix up

                Jo: without being 100% sure but I think it's after a record change or delete that it starts to act up again. I spent the night reviewing my linking fields names. Let's see what happens tomorrow

                Tom

                Originally posted by Tom Cone Jr View Post
                Gaby,
                1) How did you produce it?
                Directly copied from the child
                table (Invoice table). The before col is from the a backup, the after col is from the live version when I was alerted to the issue.

                Originally posted by Tom Cone Jr View Post
                2) Did you verify that the invid_fk field values actually changed in the child table?
                That's what's happening. A user alerted me that when she went back to reprint one of her invoice she saw line items that should not be there and belonged to someone else's invoice. When I checked the linking filed value in the child table, it was the wrong value.

                Originally posted by Tom Cone Jr View Post
                3) Could you add the link field values (before and after) to your pdf so we could see what (and how) they changed?
                That's what you see in the first col. Instead of repeating the linking field int he pdf I copied once to save time.
                .
                Originally posted by Tom Cone Jr View Post
                4) In your set linkage did you have referential integrity enabled? (were changes and deletes being cascaded?)
                Yes

                Comment


                • #9
                  Re: Child records mix up

                  I'd be curious to know if the others reporting problems were also using a set with referential integrity enabled? And, more to the point, would disabling RI eliminate the problem?

                  Comment


                  • #10
                    Re: Child records mix up

                    Tom: I just changed field names and see what happens next. If the problem persists I'll disable RI.

                    I just though of a detail that could be relevant to the issue:
                    once or twice a day I copy the files from the server to my machine to test new features. From my machine I can access the folder on the server where the A5 files reside. With windows explorer I navigate to the server, highlight all the files in the folder then copy and paste them to a test folder on my machine. Would/could this procedure affect the files while users are logged on and working with the DB?

                    Comment


                    • #11
                      Re: Child records mix up

                      Gaby, I don't know, but your scenario makes the hair on the back of my neck stand up. Before copying and pasting, I'd verify the other users were logged off the database.

                      If you really want to get down to brass tacks, you should begin keeping track of changes to the table using an audit system that writes records to an external table and contains: (a) the original field values (b) the changed field values (c) the user name making the change (d) the date / time of the change. Each time a record is entered and saved, or changed and saved, or deleted, an entry would be written to the audit table. Dr. Wayne supplies the code (with instructions) for this kind of thing in his "xbasic for Everyone" book.

                      Comment


                      • #12
                        Re: Child records mix up

                        Originally posted by Tom Cone Jr View Post
                        I'd be curious to know if the others reporting problems were also using a set with referential integrity enabled? And, more to the point, would disabling RI eliminate the problem?
                        Yes, I am using a set with RI enabled.

                        I will disable RI and see what happens. Problem is I have no way of testing other than wait and see what happens.

                        Regards,
                        Jo Hulsen
                        Dommel Valley Solutions
                        The Netherlands

                        Comment


                        • #13
                          Re: Child records mix up

                          Jo & Gaby, I thought of RI because something in your design is causing the link field value (the foreign key) to be changed in the child table records. RI will change the link field value if it thinks for some reason that the user has changed the primary key in the parent table... This would happen automatically and silently.

                          I can't think of anything else that Alpha does that would happen "automatically" in the background, so to speak, and also cause the foreign key to be changed. Naturally, I'm ruling out deliberate operator intervention.

                          Comment


                          • #14
                            Re: Child records mix up

                            Originally posted by Tom Cone Jr View Post
                            Gaby, I don't know, but your scenario makes the hair on the back of my neck stand up. Before copying and pasting, I'd verify the other users were logged off the database.
                            Thanks Tom; I'll refrain from doing this from now on and wait for the users to log off.

                            Comment

                            Working...
                            X