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:Clone() not working in Xailer 8
TMemDataSet:Clone() not working in Xailer 8
Hi,
In Xailer 7.2 it's ok.
Could you please check?
Regards,
Fausto Di Creddo Trautwein
In Xailer 7.2 it's ok.
Could you please check?
Regards,
Fausto Di Creddo Trautwein
- Adjuntos
-
- TestClone.zip
- (3.54 KiB) Descargado 96 veces
- ignacio
- Site Admin
- Mensajes: 9253
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: TMemDataSet:Clone() not working in Xailer 8
Hi,
We will take a look. BTW, if a RTE is generated, the error.log is highly appreciated.
Regards,
We will take a look. BTW, if a RTE is generated, the error.log is highly appreciated.
Regards,
Re: TMemDataSet:Clone() not working in Xailer 8
Unfortunately there is no RTE.
Thanks,
Fausto
Thanks,
Fausto
- ignacio
- Site Admin
- Mensajes: 9253
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: TMemDataSet:Clone() not working in Xailer 8
Unfortunately I can´t see the error. Please be MORE SPECIFIC.
My test with sample \datacontrols\MemDataset2
Everything worked as expected.
Regards,
My test with sample \datacontrols\MemDataset2
Código: Seleccionar todo
METHOD RSCreate( oSender ) CLASS TForm1
LOCAL aData, aHeaders
LOCAL oClone
aData := ::oSQLiteDataSource1:QueryArray( "SELECT * FROM CUSTOMER", @aHeaders )
oSender:Open( aData, aHeaders )
oClone := ::oRS:Clone()
WITH OBJECT oClone
:Gotop()
DO WHILE !:Eof()
LogDebug( :First )
:Skip()
ENDDO
:End()
END WITH
RETURN Nil
Regards,
Re: TMemDataSet:Clone() not working in Xailer 8
Please run the project attached in the first post.
Fausto
Fausto
- ignacio
- Site Admin
- Mensajes: 9253
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: TMemDataSet:Clone() not working in Xailer 8
Hi,
Done! Everything worked as expected.
Regards.
Done! Everything worked as expected.
Regards.
Re: TMemDataSet:Clone() not working in Xailer 8
Hi,
Until version 7.2 when a record was added to the cloned TMemDataSet it was reflected to the original TMemDataSet, in version 8 this does not happen.
So, in the code bellow, in version 7.2 oDSClone:RecCount() is equal to ::oMemDataSet1:RecCount(). And in version 8 they are not, ::oMemDataSet1:RecCount() remains 0.
Thanks for your time,
Fausto
Until version 7.2 when a record was added to the cloned TMemDataSet it was reflected to the original TMemDataSet, in version 8 this does not happen.
So, in the code bellow, in version 7.2 oDSClone:RecCount() is equal to ::oMemDataSet1:RecCount(). And in version 8 they are not, ::oMemDataSet1:RecCount() remains 0.
Código: Seleccionar todo
METHOD Button1Click( oSender ) CLASS TForm1
LOCAL oDSClone
oDSClone:= ::oMemDataSet1:Clone()
oDSClone:AddNew()
oDSClone:id:= 1
oDSClone:Update()
::oMemDataSet1:Refresh()
::oEdit1:Value:= ::oMemDataSet1:RecCount()
::oEdit2:Value:= oDSClone:RecCount()
RETURN Nil
Fausto
- ignacio
- Site Admin
- Mensajes: 9253
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: TMemDataSet:Clone() not working in Xailer 8
Hi,
Not in my tests. As you can see in the code only when a TRUE parameter is passed to Clone() method the data is also cloned.
Not in my tests. As you can see in the code only when a TRUE parameter is passed to Clone() method the data is also cloned.
Código: Seleccionar todo
METHOD Clone( lFull ) CLASS XMemRecords
LOCAL oDataSet, oField
DEFAULT lFull TO .f.
WITH OBJECT oDataSet := TMemDataSet():Create()
FOR EACH oField IN ::oDataset:aFields
WITH OBJECT :AddField( oField:cName )
:cDisplayName := oField:cDisplayName
:cDbfName := oField:cDbfName
:cType := oField:cType
:nLen := oField:nLen
:nDec := oField:nDec
:lAllowsNull := oField:lAllowsNull
:lEditable := oField:lEditable
:DefValue := oField:DefValue
:lAutoInc := oField:lAutoInc
:lPrimaryKey := oField:lPrimaryKey
:cTable := oField:cTable
:cFullname := oField:cFullname
END WITH
NEXT
FOR EACH oField IN ::oDataset:aUserFields
:AddCalcField( oField:cName, oField:bGetValue )
NEXT
:cProcess := ::oDataset:cProcess
:lDisplayErrors := ::oDataset:lDisplayErrors
:lReadOnly := ::oDataset:lReadOnly
:lUpdLinked := ::oDataset:lUpdLinked
:oRecords:cFiltExp := ::cFiltExp
:oRecords:SortExp := ::SortExp
IF ::oDataset:lOpen
:Open( iif( !lFull, ::aData, aClone( ::aData ) ) )
:Goto( ::Recno )
ENDIF
END WITH
RETURN oDataset
Re: TMemDataSet:Clone() not working in Xailer 8
Hi,
I've tested by installing Xailer 8 in a new folder and it's still not working.
What else can I try to resolve this issue?
Maybe someone else can try it and post the result. Somebody ?
Thanks,
Fausto
I've tested by installing Xailer 8 in a new folder and it's still not working.
What else can I try to resolve this issue?
Maybe someone else can try it and post the result. Somebody ?
Thanks,
Fausto
Re: TMemDataSet:Clone() not working in Xailer 8
Dear friends,
I installed Xailer 8 on another computer, one that never had Xailer installed, and no luck. The same problem persists.
Downloaded Xailer 8 from https://download.xailer.com/?en&file=1
and harbour from https://download.xailer.com/?en&file=2
I will be grateful if you continue to investigate this case.
Fausto
I installed Xailer 8 on another computer, one that never had Xailer installed, and no luck. The same problem persists.
Downloaded Xailer 8 from https://download.xailer.com/?en&file=1
and harbour from https://download.xailer.com/?en&file=2
I will be grateful if you continue to investigate this case.
Fausto
- ignacio
- Site Admin
- Mensajes: 9253
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: TMemDataSet:Clone() not working in Xailer 8
Hi,
Complete project attached. Included EXE file.
https://ozs0-my.sharepoint.com/:u:/g/pe ... g?e=xZnKMJ
I really do not know where is the problem
Regards,
Complete project attached. Included EXE file.
https://ozs0-my.sharepoint.com/:u:/g/pe ... g?e=xZnKMJ
I really do not know where is the problem
Regards,
Re: TMemDataSet:Clone() not working in Xailer 8
Hi,
Thank you for the files.
I think maybe the version available for download may have some difference from yours.
I'm saying this because I downloaded and installed it on another computer and it gave me the wrong result.
In my tests if I added
and changeg
This way it works, because ::aData and ::aWork were being updated, but not ::RecCount.
I would really like to switch to version 8, with all the improvements it has, but this issue is holding me back.
Thank you again and I hope you can come up with an idea.
Fausto.
Thank you for the files.
I think maybe the version available for download may have some difference from yours.
I'm saying this because I downloaded and installed it on another computer and it gave me the wrong result.
In my tests if I added
Código: Seleccionar todo
/*MemRecords.prg*/
METHOD My_Refresh() CLASS XMemRecords
::RecCount := Len( ::aWork )
::Bof := .F.
::Eof := ( ::RecCount == 0 )
RETURN Nil
Código: Seleccionar todo
/*Form1.prg*/
METHOD Button1Click( oSender ) CLASS TForm1
LOCAL oDSClone
oDSClone:= ::oMemDataSet1:Clone()
oDSClone:AddNew()
oDSClone:id:= 1
oDSClone:Update()
::oMemDataSet1:oRecords:My_Refresh()
::oEdit1:Value:= ::oMemDataSet1:RecCount()
::oEdit2:Value:= oDSClone:RecCount()
RETURN Nil
I would really like to switch to version 8, with all the improvements it has, but this issue is holding me back.
Thank you again and I hope you can come up with an idea.
Fausto.
- ignacio
- Site Admin
- Mensajes: 9253
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: TMemDataSet:Clone() not working in Xailer 8
Hello,
Xailer 8.01 will be published shortly. Please wait until then. TIA.
Regards,
Xailer 8.01 will be published shortly. Please wait until then. TIA.
Regards,
Re: TMemDataSet:Clone() not working in Xailer 8
Hi,
It's ok with Xailer 8.0.1.
Thank you very much.
Regards,
Fausto
It's ok with Xailer 8.0.1.
Thank you very much.
Regards,
Fausto