If you sort a TMemDataSet, edit a record and then cancel the operation, the previous/next record is updated and not the actual.
Please use the project attached. Edit the column "Produto" and press ESC to cancel and you can see the error.
Thanks.
Fausto Di Creddo Trautwein
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
TMemDataSet error
TMemDataSet error
- Adjuntos
-
- cancel.rar
- (2.53 KiB) Descargado 211 veces
- ignacio
- Site Admin
- Mensajes: 9250
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: TMemDataSet error
Hello,
I hope the problem gets fixed with this new code on module MemRecords.prg method Cancel:
If you want I can send you also the OBJ and O file.
Any feedback will be highly appreciated.
Regards,
I hope the problem gets fixed with this new code on module MemRecords.prg method Cancel:
Código: Seleccionar todo
METHOD Cancel() CLASS XMemRecords
LOCAL nRecno
IF !::lOnAppend
nRecno := ::OrgRecno()
IF Len( ::aData ) >= nRecno .AND. Len( ::aData[ nRecno ] ) >= Len( ::oDataSet:aRecord )
Aeval( ::oDataset:aRecord, {|v,e| ::aData[ nRecno, e ] := v } )
ENDIF
ELSE
::lOnAppend := .F.
ENDIF
RETURN NIL
Any feedback will be highly appreciated.
Regards,
Re: TMemDataSet error
It is ok now.
Is it enough to add changed MemRecords.prg to a project ?
Thank you very much.
Is it enough to add changed MemRecords.prg to a project ?
Thank you very much.
- ignacio
- Site Admin
- Mensajes: 9250
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: TMemDataSet error
Yes, is enough. Thank you for your feedback.
Regards,
Regards,