GRID control and RLOCK()

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: GRID control and RLOCK()

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Kana
Posts: 27
Joined: Sun Feb 07, 2010 2:48 pm

Re: GRID control and RLOCK()

Post 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.
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: GRID control and RLOCK()

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Kana
Posts: 27
Joined: Sun Feb 07, 2010 2:48 pm

Re: GRID control and RLOCK()

Post 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?
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: GRID control and RLOCK()

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Kana
Posts: 27
Joined: Sun Feb 07, 2010 2:48 pm

Re: GRID control and RLOCK()

Post 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.
User avatar
raumi75
Posts: 135
Joined: Wed Dec 17, 2008 2:31 am
Location: Lünen, Germany
Contact:

Re: GRID control and RLOCK()

Post 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
Post Reply