Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RLock fails and closes form

Status
Not open for further replies.

sdocker

IS-IT--Management
Aug 12, 2010
218
GB
Hi,

I am using a grid with a CheckBox to change multiple records. I make the changes one at a time, ie. if the user clicks on the CheckBox, the field in the table is REPLACED with the new value.

The problem I'm encountering is if RLOCK fails, it doesn't return .F., It just closes the form.

The form is called as follows:

DO FORM frmMarkExtensions NAME ofrmMarkExtensions LINKED​

Sam
 
To expand: The feature "Coverage" comes from the natural language meaning: The profiler answers the question what code, more precise what branches of code (if/else, or eg all cases of a CASE, etc) are executed. The coverage profiler evaluates the log for that. The raw log is merely chronological order of things happening and you see what happens line for line logged into that file.

Bye, Olaf.
 
Olaf,

I could use some help on where to place the "Create Cursor" code.

Set Coverage To doesn't give me enough info.

Thanks,
Sam
 
Do this in the command window.

You can also just open the log file, but once you have the data in a cursor you have headers on the data and can do a few more things on it, filter, sum, etc.
The last lines are important to see what happened last.

Bye, Olaf.
 
Olaf and Mike,

Both your advice led me to the same conclusion.

It turns out that none of the methods were triggered because the checkbox was bound to a field and the change was attempted before the record was checked for a lock.

I changed to a cursor with a select SQL and worked around it.

Thanks,

Sam
 
FYI: Pessimistic buffer mode would do what you do manually, lock a record before enabling to change it. Actually "pessimistic" vs "optimistic" is not at all about buffering, but about locking. The pessimist is the one fearing conflict, therefore first locking, then changing. The optimist is changing buffer and will only lock at write time.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top