Hi All,
I have recently discovered something that i think may be of interest...
I believe that FIND NO-LOCK gets the record and then stores it in memory. Then, when the actual record in the database is changed, it doesn't update the copy in memory until you do another FIND.
For example, I have a table in a database. I open a progress editor session and run this program
FIND table1 WHERE table1.item = "abc123" NO-LOCK.
PAUSE.
DISPLAY table1.
At the pause, I then go and modify one field of that record (like item?) in another session. I also then DISPLAY it to see if it has changed, and it has.
In the original sesion, I "Press space bar to continue.", and low and behold, it hasn't updated the record. If I then run the program again, it works as I'd expect it to and DISPLAYs the change.
I thought I was going mad till I found this! I have done another FIND when I need to to fix this, but hey, 3 hours well learnt!
I understand that this may be to conserve disk access, as many records may not change that often (stats & history etc.) so may be fine. Plus, memory is faster...
Can I make progress check the actual database for every field that I use after I have a NO-LOCK, and not rely on the temporary memory record?
I have recently discovered something that i think may be of interest...
I believe that FIND NO-LOCK gets the record and then stores it in memory. Then, when the actual record in the database is changed, it doesn't update the copy in memory until you do another FIND.
For example, I have a table in a database. I open a progress editor session and run this program
FIND table1 WHERE table1.item = "abc123" NO-LOCK.
PAUSE.
DISPLAY table1.
At the pause, I then go and modify one field of that record (like item?) in another session. I also then DISPLAY it to see if it has changed, and it has.
In the original sesion, I "Press space bar to continue.", and low and behold, it hasn't updated the record. If I then run the program again, it works as I'd expect it to and DISPLAYs the change.
I thought I was going mad till I found this! I have done another FIND when I need to to fix this, but hey, 3 hours well learnt!
I understand that this may be to conserve disk access, as many records may not change that often (stats & history etc.) so may be fine. Plus, memory is faster...
Can I make progress check the actual database for every field that I use after I have a NO-LOCK, and not rely on the temporary memory record?