Page 2 of 2

Re: GRID control and RLOCK()

Posted: Wed Feb 17, 2010 4:03 pm
by Roberto Lopez
Roberto Lopez wrote:
Any help is welcome.
I've found the following text in the POSTGRE RDD sources:
/*
* This is an experimental RDD for xharbour/contrib/pgsql interface.
* It has been created to test the possibilities of usrrdd.
* It doesn't support many functions and commands and many things could be optimized.
*/
So, at the moment I'll disable edit capability for grid when PostGre RDD is used.

I like PostGre a lot, specially because it is fully free. I'll still researching for alternate methods to make it work.

Again, any help on this is welcome.

Re: GRID control and RLOCK()

Posted: Sat Feb 20, 2010 9:56 pm
by Kana
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.

Re: GRID control and RLOCK()

Posted: Sat Feb 20, 2010 11:56 pm
by Roberto Lopez
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.

Re: GRID control and RLOCK()

Posted: Sun Feb 21, 2010 12:54 am
by Kana
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?

Re: GRID control and RLOCK()

Posted: Mon Feb 22, 2010 12:34 pm
by Roberto Lopez
Kana wrote:
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?
I not understand clearly...

You are talking about Browse now?

If so, and if you use the LOCK clause, RECORD BEING EDITED WILL BE LOCKED. If you omit that clause, Browse WILL NOT attempt to lock a record on editing.

You have full control about locking. That's all.

Re: GRID control and RLOCK()

Posted: Mon Feb 22, 2010 4:00 pm
by Kana
Roberto Lopez wrote:
Kana wrote:
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?
I not understand clearly...

You are talking about Browse now?

If so, and if you use the LOCK clause, RECORD BEING EDITED WILL BE LOCKED. If you omit that clause, Browse WILL NOT attempt to lock a record on editing.

You have full control about locking. That's all.


>You are talking about Browse now?

Yes, I understand how functioning LOCK clause in BROWSE,
but I do not understand the difference BROWSE-GRID only for lock clause.
I do not know how to lock record when I use the GRID and whether it is possible.

I hope I have explained my curiosity now :)

Thanks Roberto,
Regards.

Re: GRID control and RLOCK()

Posted: Mon Feb 22, 2010 5:53 pm
by raumi75
Hello Roberto,

i tried your commands on my database but could not repeat your error.
PGRDD/3000 Data type error, Cannot insert in a joined table, or unknown error
Could you post your table definition?

Raumi