Page 1 of 1

Nuevo FWH 22.10

PostPosted: Wed Nov 02, 2022 11:57 am
by Antonio Linares

Re: Nuevo FWH 22.10

PostPosted: Wed Nov 02, 2022 12:07 pm
by VictorCasajuana
Hola Antonio, dbRollBack() funciona en entornos de red con DBF?

Enviado desde mi motorola edge 20 mediante Tapatalk

Re: Nuevo FWH 22.10

PostPosted: Wed Nov 02, 2022 12:11 pm
by Antonio Linares
Estimado Victor,

Es Mr. Rao quien nos tiene que responder tu pregunta :-)

Re: Nuevo FWH 22.10

PostPosted: Wed Nov 02, 2022 3:59 pm
by nageswaragunupudi
VictorCasajuana wrote:Hola Antonio, dbRollBack() funciona en entornos de red con DBF?

Enviado desde mi motorola edge 20 mediante Tapatalk


It should work.
Can you help is by testing?

E.g. customer.dbf opened with alias CUST
Code: Select all  Expand view

? CUST->CITY
CUST->CITY := "CHANGED"
? CUST->CITY
CUST->( dbRollBack() )
? CUST->CITY
 


Note: dbRollBak() works only when the Record Pointer is not moved and DBCOMMIT() is not executed already

Re: Nuevo FWH 22.10

PostPosted: Wed Nov 02, 2022 4:39 pm
by VictorCasajuana
nageswaragunupudi wrote:
VictorCasajuana wrote:Hola Antonio, dbRollBack() funciona en entornos de red con DBF?

Enviado desde mi motorola edge 20 mediante Tapatalk


It should work.
Can you help is by testing?

E.g. customer.dbf opened with alias CUST
Code: Select all  Expand view

? CUST->CITY
CUST->CITY := "CHANGED"
? CUST->CITY
CUST->( dbRollBack() )
? CUST->CITY
 


Note: dbRollBak() works only when the Record Pointer is not moved and DBCOMMIT() is not executed already


thanks for the reply.
I will make the case:
Code: Select all  Expand view

? CUST->CITY
CUST->CITY := "CHANGED"
? CUST->CITY
CUTS->( DbUnlock() )  
// do other process...
CUST->( dbRollBack() )
? CUST->CITY
 


Taking into account that CUST->CITY has the value: "ORIGINAL"
if after making the change to "CHANGED" and doing the dbunlock, if before the dbrollback() another user modifies the value of CUST->CITY by "OTHER USER"
when the rollback() is performed, what value will CUST->CITY finally have, "ORIGINAL" or "OTHER USER" ?

Re: Nuevo FWH 22.10

PostPosted: Wed Nov 02, 2022 6:42 pm
by nageswaragunupudi
After doing unlock also, dbrollback does not work
Rollback works before (1) moving record pointer (2) before commit and also (3) before unlock.

This is useful for making modifications in more than one dbf and ensure that either all changes are committed or rolledback.

Please refer
viewtopic.php?f=3&t=42174&p=253200&hilit=dbrollback&sid=e912045ef71b285d5d2193725aa93ffe#p253200

You may post further queries in that post so that all users will join.

Re: Nuevo FWH 22.10

PostPosted: Thu Nov 03, 2022 9:42 am
by VictorCasajuana
nageswaragunupudi wrote:After doing unlock also, dbrollback does not work
Rollback works before (1) moving record pointer (2) before commit and also (3) before unlock.

This is useful for making modifications in more than one dbf and ensure that either all changes are committed or rolledback.

Please refer
viewtopic.php?f=3&t=42174&p=253200&hilit=dbrollback&sid=e912045ef71b285d5d2193725aa93ffe#p253200

You may post further queries in that post so that all users will join.


thanks for the clarification!