Correção de Bug em Datafield quando DataSet é TMemDataset e GetFromStruct e
AddcalcField é usado.
:::::::::::::::Exemplo: oDataSet:GetStructFrom( tbOrigem ) ....
oDataset:AddcalcField('teset',{|| oDataSet:codigo + 1 }) ..... >>>
oDataSet:AddNew() <Problema aqui>
METHOD BasicType() CLASS XDataField
LOCAL cType := ::cType
// Bug en tipo MONEY para ADS
// Bug on TMemDataSet use AddCalcField >>> wilson alves<<<
IF Empty( cType ) .AND. ( ::oDataSet:ISKindOF('TMemDataSet') .OR.
::oDataSet:oDataSource:IsKindOf( "TAdsDataSource" ))
cType := "N"
ENDIF
DO CASE
CASE cType == "INTEGER" .OR. cType == "SHORTINT" .OR. cType ==
"CURDOUBLE" .OR. ;
cType == "DOUBLE" .OR. cType == "AUTOINC"
cType := "N"
CASE cType == "TIME" .OR. cType == "TIMESTAMP"
cType := "C"
CASE cType == "BINARY" .OR. cType == "IMAGE" .OR. cType == "RAW" .OR.
cType = "B"
cType := "M"
ENDCASE
RETURN cType
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.
Bug TMemDataSet
-
- Mensajes: 120
- Registrado: Vie Mar 14, 2008 1:14 am
- ignacio
- Site Admin
- Mensajes: 9441
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Bug TMemDataSet
Wilson,
Please send us a small sample that reproduces your error. Thanks in advance.
Regards,
Note: I am afraid we will not include your patch since it does not fix the
possible problem, but only hides it (in case there is).
"Wilson-CPS" <wilson@casteloporto.com.br> escribió en el mensaje
news:[email=48191205@ozsrv2.ozlan.local...]48191205@ozsrv2.ozlan.local...[/email]
> Correção de Bug em Datafield quando DataSet é TMemDataset e GetFromStruct
> e AddcalcField é usado.
>
> :::::::::::::::Exemplo: oDataSet:GetStructFrom( tbOrigem ) ....
> oDataset:AddcalcField('teset',{|| oDataSet:codigo + 1 }) .....
> >>> oDataSet:AddNew() <Problema aqui>
>
>
> METHOD BasicType() CLASS XDataField
>
> LOCAL cType := ::cType
>
> // Bug en tipo MONEY para ADS
> // Bug on TMemDataSet use AddCalcField >>> wilson alves<<<
>
> IF Empty( cType ) .AND. ( ::oDataSet:ISKindOF('TMemDataSet') .OR.
> ::oDataSet:oDataSource:IsKindOf( "TAdsDataSource" ))
> cType := "N"
> ENDIF
>
> DO CASE
> CASE cType == "INTEGER" .OR. cType == "SHORTINT" .OR. cType ==
> "CURDOUBLE" .OR. ;
> cType == "DOUBLE" .OR. cType == "AUTOINC"
> cType := "N"
> CASE cType == "TIME" .OR. cType == "TIMESTAMP"
> cType := "C"
> CASE cType == "BINARY" .OR. cType == "IMAGE" .OR. cType == "RAW" .OR.
> cType = "B"
> cType := "M"
> ENDCASE
>
> RETURN cType
>
Please send us a small sample that reproduces your error. Thanks in advance.
Regards,
Note: I am afraid we will not include your patch since it does not fix the
possible problem, but only hides it (in case there is).
"Wilson-CPS" <wilson@casteloporto.com.br> escribió en el mensaje
news:[email=48191205@ozsrv2.ozlan.local...]48191205@ozsrv2.ozlan.local...[/email]
> Correção de Bug em Datafield quando DataSet é TMemDataset e GetFromStruct
> e AddcalcField é usado.
>
> :::::::::::::::Exemplo: oDataSet:GetStructFrom( tbOrigem ) ....
> oDataset:AddcalcField('teset',{|| oDataSet:codigo + 1 }) .....
> >>> oDataSet:AddNew() <Problema aqui>
>
>
> METHOD BasicType() CLASS XDataField
>
> LOCAL cType := ::cType
>
> // Bug en tipo MONEY para ADS
> // Bug on TMemDataSet use AddCalcField >>> wilson alves<<<
>
> IF Empty( cType ) .AND. ( ::oDataSet:ISKindOF('TMemDataSet') .OR.
> ::oDataSet:oDataSource:IsKindOf( "TAdsDataSource" ))
> cType := "N"
> ENDIF
>
> DO CASE
> CASE cType == "INTEGER" .OR. cType == "SHORTINT" .OR. cType ==
> "CURDOUBLE" .OR. ;
> cType == "DOUBLE" .OR. cType == "AUTOINC"
> cType := "N"
> CASE cType == "TIME" .OR. cType == "TIMESTAMP"
> cType := "C"
> CASE cType == "BINARY" .OR. cType == "IMAGE" .OR. cType == "RAW" .OR.
> cType = "B"
> cType := "M"
> ENDCASE
>
> RETURN cType
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
-
- Mensajes: 120
- Registrado: Vie Mar 14, 2008 1:14 am
Bug TMemDataSet
na verdade a alteração que sugeri não resolveu o problema
corrigindo:::
*** a que se verificar se odatasource está vazio porque tmemdataset não
tem datasource
IF Empty( cType ) .AND. ( ::oDataSet:oDataSource<>Nil
::oDataSet:oDataSource:IsKindOf( "TAdsDataSource" ))
cType := "N"
ENDIF
"Ignacio Ortiz de Zúñiga" <NoName@xailer.com> escreveu na mensagem
news:48195425$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Wilson,
>
> Please send us a small sample that reproduces your error. Thanks in
> advance.
>
> Regards,
>
> Note: I am afraid we will not include your patch since it does not fix the
> possible problem, but only hides it (in case there is).
>
> "Wilson-CPS" <wilson@casteloporto.com.br> escribió en el mensaje
> news:[email=48191205@ozsrv2.ozlan.local...]48191205@ozsrv2.ozlan.local...[/email]
>> Correção de Bug em Datafield quando DataSet é TMemDataset e GetFromStruct
>> e AddcalcField é usado.
>>
>> :::::::::::::::Exemplo: oDataSet:GetStructFrom( tbOrigem ) ....
>> oDataset:AddcalcField('teset',{|| oDataSet:codigo + 1 }) ..... >>>
>> oDataSet:AddNew() <Problema aqui>
>>
>>
>> METHOD BasicType() CLASS XDataField
>>
>> LOCAL cType := ::cType
>>
>> // Bug en tipo MONEY para ADS
>> // Bug on TMemDataSet use AddCalcField >>> wilson alves<<<
>>
>> IF Empty( cType ) .AND. ( ::oDataSet:ISKindOF('TMemDataSet') .OR.
>> ::oDataSet:oDataSource:IsKindOf( "TAdsDataSource" ))
>> cType := "N"
>> ENDIF
>>
>> DO CASE
>> CASE cType == "INTEGER" .OR. cType == "SHORTINT" .OR. cType ==
>> "CURDOUBLE" .OR. ;
>> cType == "DOUBLE" .OR. cType == "AUTOINC"
>> cType := "N"
>> CASE cType == "TIME" .OR. cType == "TIMESTAMP"
>> cType := "C"
>> CASE cType == "BINARY" .OR. cType == "IMAGE" .OR. cType == "RAW"
>> .OR. cType = "B"
>> cType := "M"
>> ENDCASE
>>
>> RETURN cType
>>
>
>
corrigindo:::
*** a que se verificar se odatasource está vazio porque tmemdataset não
tem datasource
IF Empty( cType ) .AND. ( ::oDataSet:oDataSource<>Nil
::oDataSet:oDataSource:IsKindOf( "TAdsDataSource" ))
cType := "N"
ENDIF
"Ignacio Ortiz de Zúñiga" <NoName@xailer.com> escreveu na mensagem
news:48195425$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Wilson,
>
> Please send us a small sample that reproduces your error. Thanks in
> advance.
>
> Regards,
>
> Note: I am afraid we will not include your patch since it does not fix the
> possible problem, but only hides it (in case there is).
>
> "Wilson-CPS" <wilson@casteloporto.com.br> escribió en el mensaje
> news:[email=48191205@ozsrv2.ozlan.local...]48191205@ozsrv2.ozlan.local...[/email]
>> Correção de Bug em Datafield quando DataSet é TMemDataset e GetFromStruct
>> e AddcalcField é usado.
>>
>> :::::::::::::::Exemplo: oDataSet:GetStructFrom( tbOrigem ) ....
>> oDataset:AddcalcField('teset',{|| oDataSet:codigo + 1 }) ..... >>>
>> oDataSet:AddNew() <Problema aqui>
>>
>>
>> METHOD BasicType() CLASS XDataField
>>
>> LOCAL cType := ::cType
>>
>> // Bug en tipo MONEY para ADS
>> // Bug on TMemDataSet use AddCalcField >>> wilson alves<<<
>>
>> IF Empty( cType ) .AND. ( ::oDataSet:ISKindOF('TMemDataSet') .OR.
>> ::oDataSet:oDataSource:IsKindOf( "TAdsDataSource" ))
>> cType := "N"
>> ENDIF
>>
>> DO CASE
>> CASE cType == "INTEGER" .OR. cType == "SHORTINT" .OR. cType ==
>> "CURDOUBLE" .OR. ;
>> cType == "DOUBLE" .OR. cType == "AUTOINC"
>> cType := "N"
>> CASE cType == "TIME" .OR. cType == "TIMESTAMP"
>> cType := "C"
>> CASE cType == "BINARY" .OR. cType == "IMAGE" .OR. cType == "RAW"
>> .OR. cType = "B"
>> cType := "M"
>> ENDCASE
>>
>> RETURN cType
>>
>
>