5 Replies Latest reply on Nov 17, 2016 6:06 AM by mperley

    Server and Client Showing Different Data for Same Record

    mperley

      I have a bot running on a server whose only purpose is to import data in an old Visual FoxPro database (everyone else uses a Mac). For some tables it's rather easy to identify records that have changed and only import those, but every once in a while it's necessary to do a complete purge and re-import (thank you, FMP 15, for Truncate Table). I'm using an onRecordLoad script trigger to fire off these imports from one client to the bot, once the import is run, the bot uses an onRecordLoad script to communicate back to the initiating client to signal that the import is finished.

       

      All of this works great for small datasets, however things seem to be breaking down when I'm doing a clean sweep of the FoxPro data (about 10 tables, most with only a few thousand records but two that have 30,000 - 500,000. After these larger imports, the onRecordLoad script trigger no longer fires on the client. In reality, no additional changes made by the bot are getting pushed to the client. The only way I can get changes to start pushing back and forth again is if I close the file and FMP on the client machine. Has anyone else run into this issue and found a way around it?

       

      Thanks in advance for any suggestions.

        • 1. Re: Server and Client Showing Different Data for Same Record
          philmodjunk

          Since you are not actually updating the records, but deleting them all and re-importing, what exactly do you see from the context of that client machine after the import has completed?

           

          Do you see:

          a) old records that have actually been deleted

          b) No records

          c) something else?

          • 2. Re: Server and Client Showing Different Data for Same Record
            mperley

            I'm seeing two things:

            1-Records aren't being updated (I use a "commands" table to log remote commands, with a boolean field set to 1 when the command has been run. In this case, it shows 1 on the bot but 0 on the client.

            2-Deleted records aren't reflected in the client. There is a "session" table used to trigger communication between the two clients. The session record is deleted on the bot, but it is not being deleted on the client.

            • 3. Re: Server and Client Showing Different Data for Same Record
              philmodjunk

              I don't follow that.

              1) From your first post you aren't updating records, you are truncating the table--which deletes all records and importing a new set of records. There are no records to update. Either the client is showing data from records now deleted or something, but there isn't any updating going on here unless I missed something?

               

              2) is this session record the same record in the same table in the same file? Or something else?

               

              I've seen one other report that has some similarities. They resolved the issue by completely restarting their server if I recall correctly.

              • 4. Re: Server and Client Showing Different Data for Same Record
                mperley

                1 - Correct, we're truncating tables and then re-importing. This is facilitated by session and command tables that facilitates these updates between client/robot and logs them (session table drives the onRecordLoad script triggers and the command table "status" field updates from 0 to 1 when each update is complete. Neither deleted session records or command field updates are being relayed to the client.

                 

                2 - All of these tables are in the same file.

                 

                I'll try re-starting the server and see what effect it may have. Thanks.

                • 5. Re: Server and Client Showing Different Data for Same Record
                  mperley

                  I re-started the server but continue to run into the issue. There's one additional thing I can add, though, that I noticed while working on the file remotely (I'm usually on the same LAN during the day). After confirming that the import routine has finished on the bot and both the the session/command tables aren't updated on the client, the client app appears to be running constant and consistent finds. It must happen too quickly on the LAN to notice, but over WAN I could see the window constantly flickering as a modal dialog box would come to front of the screen with a message "Performing Find". It would only show this for a fraction of a second and then go away, but it happened repeatedly.