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.

TMemDataSet error

Xailer professional forum in English
Responder
ftwein
Mensajes: 50
Registrado: Lun Oct 22, 2007 5:17 pm

TMemDataSet error

Mensaje por ftwein »

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
Adjuntos
cancel.rar
(2.53 KiB) Descargado 211 veces
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9250
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: TMemDataSet error

Mensaje por ignacio »

Hello,

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
If you want I can send you also the OBJ and O file.

Any feedback will be highly appreciated.

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
ftwein
Mensajes: 50
Registrado: Lun Oct 22, 2007 5:17 pm

Re: TMemDataSet error

Mensaje por ftwein »

It is ok now.

Is it enough to add changed MemRecords.prg to a project ?

Thank you very much.
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9250
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: TMemDataSet error

Mensaje por ignacio »

Yes, is enough. Thank you for your feedback.

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Responder