Roberto Lopez wrote:Kana wrote:I hope that my question is not off topic, theme is the 'GRID control and RLOCK ()'.
I do not know how to lock the record when you use a DBF table.
BROSE command had a LOCK syntax but BROWSE superseded by the GRID control.
I tried, for example, but GRID25 grid allows update the same record from two different locations.
Grid attempts to lock record to change always.
Roberto,
I'm not sure if I understood you well (my English), sorry.
I replaced the example GRID25 of the following:
************************
/*
@ 10,10 GRID Grid_1 ;
WIDTH 770 ;
HEIGHT 440 ;
HEADERS {'Column 1','Column 2','Column 3','Column 4','Column 5','Column 6'} ;
WIDTHS {140,140,140,100,100,100};
EDIT ;
VALUE { 1 , 1 } ;
COLUMNCONTROLS { aCtrl_1 , aCtrl_2 , aCtrl_3 , aCtrl_4 , aCtrl_5 , aCtrl_6 } ;
ROWSOURCE "Test" ;
COLUMNFIELDS { 'Code' , 'First' , 'Last' , 'Birth' , 'Married' , 'Bio' } ;
ALLOWAPPEND ;
ALLOWDELETE ;
BUFFERED
*/
// NEW code
@ 10,10 BROWSE Grid_1 ;
WIDTH 770 ;
HEIGHT 440 ;
HEADERS {'Column 1','Column 2','Column 3','Column 4','Column 5','Column 6'} ;
WIDTHS {140,140,140,100,100,100};
WORKAREA Test ;
FIELDS { 'Test->Code' , 'Test->First' , 'Test->Last' , 'Test->Birth' , 'Test->Married' , 'Test->Bio' } ;
LOCK ;
EDIT INPLACE
**************************
When I start demo.exe twice, I am in one window is positioned
the first record and enter edit.
Then in the second window, try to edit the same record to enter
I get the message: 'Record Is Being Edited By Another User'
However such is the case with the grid command.
Does this mean that I can not lock the record for editing
DBF record in the grid of commands?