Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Records not visible
Message
From
28/08/2018 01:31:32
 
 
To
27/08/2018 16:22:41
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2016
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01661733
Message ID:
01661746
Views:
59
>>>I have a very strange problem that came up in the last weeks and is happening randomly. Here's the pattern :
>>>
>>>- User add a new record
>>>- The form refresh it's grid to show all records
>>>- The new record doesn't show
>>>- The user add the same record
>>>- The form refresh it's grid to show all records
>>>- The new record appears in double. This shoudn't be possible because the form validation prevents adding a record that already exist
>>>
>>>Somewhere else, a record will appears in double or will not appear at all. If I look at the data directly in the table, everything is okay (record is there and not in double).
>>>
>>>This bug appears in many forms, from different tables and for different users. Quitting the application and reopeining it again will resolve the display problem, but it may come back later on.
>>>
>>>I really don't understand what's going on here because the bug appears randomly and on forms that haven't been modified in many months/years. I tried reindexing the database and recreate some tables from scratch thinking that it may be a indexing problem, but the problem persist.
>>>
>>>We don't use table ou record buffering.
>>>
>>>I'm starting to think it may be a new incompatibility problem betwen VFP and Windows 10.
>>>
>>>Anyone has any ideas on how to resolve this ?
>>>
>>>TIA
>>
>>Is the grid being populated through a view? If so, have you tried performing a requery on the view when refreshing grid display?
>
>No view. Grid populated with a SCAN from the table and an INSERT into a cursor that is bound to the grid.

I could imagine that this is where the problem comes from. That is why the original table looks good, but the temporary cursor contains a double record, and here the rule would not get into effect if you prevent double records in business logic. Maybe during the scan it processes the new record twice? If you can reproduce the error, add a test button on the form and browse the temporary Cursor to see if that indeed contains those two records, and then browse the actual table to compare. If the tempcursor has the double record the problem is in the logic how that is being filled.

Also I have seen that while you are on a grid, after inserting the new record, you should not only Grid.Refresh() but also Grid.SetFocus().
Christian Isberner
Software Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform