Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What prevents INSERT/APPEND?
Message
From
05/04/2024 00:09:33
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
04/04/2024 14:16:43
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01687819
Message ID:
01687823
Views:
41
>I've got another weird one, but if I can solve it, it may actually be the answer to a bunch of issues in this application.
>
>A table is open shared. At a certain point in this application, with no records in this table locked, and the table itself not locked (IsFLocked() returns .F.), other users are getting frozen on attempts to INSERT INTO or APPEND BLANK in this table.
>
>Details:
>
>- I can replicate the problem testing with two instances of VFP on a single machine with local data. So it's not network issues.
>
>- I've doctored things to do a whole bunch of logging (in the instance that's causing the problem) that includes DISPLAY STATUS. The relevant table is open in only one work area and shows "Lock(s): none" (with angle brackets around "none," but those are hard to post).
>
>- The "certain point" involves a message being displayed to the user. Once that message is dismissed, other users are able to add records again. The code that displays the message adds one record to this table, but otherwise, doesn't touch it, and that record isn't added until after the message is dismissed.
>
>- In my testing, I've simplified to running one instance to the point where this happens, and then in the other instance, opening the table, and issuing APPEND BLANK from the Command Window. I get "Record not available" in the status bar and it just sits until I dismiss the message in the running application.
>
>- The table in question is not involved in the main action of the application at this point. It's an activity log. The only interesting/unusual thing about it is that we reuse old records in the log, so that it's not just growing forever.
>
>The symptoms I'm seeing suggest that the table header is getting locked somehow, but I can't find any evidence that's happening, including that my logs don't show the header as locked. (I tested and DISP STAT shows you a lock on record 0 when the header is locked.)
>
>Thoughts?
>
>Tamar

Hi Tamar,

One would need to see more of the code and the place in the code. Is there anything else running that can fire, like timers or other events? This is database (DBC), that have own events?

If it comes to real odd stuff, try to use PROCMON https://learn.microsoft.com/en-us/sysinternals/downloads/procmon to trace disk access.

Lutz
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform