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.

I don't like the new DbfDataSet

Xailer professional forum in English
Ingo
Mensajes: 330
Registrado: Mié Jul 05, 2006 3:58 pm

I don't like the new DbfDataSet

Mensaje por Ingo »

Ignacio,
I'm using now FieldPut instead VarPut but the DataControls in the form don't
show the new values not before oDateset:Update() is called.
How to make the DataControls showing the new values without writing them to
the database.
I don't like to assign manually each single DataControl:Value. That's too
much work to rewriting the code each app
Here is one code-snippet like I'm using:
METHOD BtnBmp1Click( oSender ) CLASS TMP5Edit
LOCAL aR, n, z := ::oMP5:FieldCount()
WITH OBJECT Gerichtsliste():New(self) //get datas from another database
browsed in a form
IF :ShowModal() = mrOK
aR := :Cargo
ENDIF
:End()
END WITH
IF aR # NIL .AND. LEN(aR) = z
WITH OBJECT ::oMP5 //the target database is already in editmode
FOR n := 1 TO Z
:FieldPut( n, aR[n] ) //instead old VarPut()
LogDebug( :FieldGet( n ) ) //the debugger window shows the new value
/*
:aFields[n]:Value := aR[n] //trying the other way
LogDebug( :aFields[n]:Value ) //the debugger window shows the new value too
*/
NEXT
END WITH
ENDIF
RETURN Nil
Regards
Ingo
Responder