Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record getting overwritten
Message
From
20/01/2020 06:45:21
 
 
To
17/01/2020 16:54:36
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01672645
Message ID:
01672678
Views:
78
>>>Have you tried rebuilding the indices/tags?
>>
>>They run code daily that rebuilds the indexes from scratch.
>>
>>>
>>>What antivirus is being used? Can you temporarily disable its real-time scanning?
>>
>>Fair question. I can ask. It's hard to imagine, though, how antivirus could cause this. To clarify, what happens is:
>>
>>1) Record X for vendor A exists.
>>2) Record Y for vendor B is added.
>>3) Record Z for vendor A is added, and sometime between the end of #2 and the end of #3, all data in record Y is replaced with all data for record X.
>>
>>Y and Z are not necessarily sequential. In the case I looked at yesterday, there was another record in between. And this doesn't always happen. I haven't found the key to when it does and when it doesn't. Got an email this morning from the client that it happened again. He's sending me the logs.
>
>From a code POV:
>
>- I've seen similar things happen when "stale" PK values get used, in some cases because variables holding their values were PRIVATE instead of LOCAL so their scopes were wider than expected. Very old code originally written before LOCAL was available in the language is especially vulnerable to this
>

Hmm, I've run into private v. local before and that's an intriguing possibility, though I still don't see how the data from record X would be involved. As I said up front, there's no use of SCATTER/GATHER for this table. (IIRC, there are one or two uses elsewhere in the app.) But I'll definitely take a look at variable scopes.

>- Somewhat relatedly, I had one case where a data entry system had been configured with hot keys (ON KEY LABEL) for convenience. There was one user who was extremely fast and knew how to enter new records with minimal typing in fields and hitting the right hot keys sequentially but very, very quickly. Sometimes she would end up with duplicate entries even though I watched her and she wasn't hitting anything twice. Looking at the code behind, it all originated in FPD 2.6, wasn't locally scoped, and some of the snippets used variables with the same names. I'm not sure how sequential ON KEY LABELs are processed in that kind of scenario but it looked like snippet code might have been stepping on each other. I considered putting CLEAR TYPEAHEAD at the start of each snippet but that really messed with users who used the hotkeys regularly. I eventually asked her to slow down a little, and the problem never arose again
>

Good thinking. Don't think there are any OKLs here, but I'll check.


>From an environment POV:
>
>- Are the VFP tables being stored on an actual Windows server, or something else like Samba on Linux, or a NAS device?
>
>- Do all workstations have the SMB2+ registry settings applied: http://www.alaska-software.com/community/smb2.cxp

I'll have to ask about those. I don't manage their hardware (or anyone's but my own).

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform