Página 1 de 1

Bug TMemDataSet

Publicado: Jue May 01, 2008 2:42 am
por Wilson-CPS
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

Bug TMemDataSet

Publicado: Jue May 01, 2008 7:24 am
por ignacio
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
>

Bug TMemDataSet

Publicado: Jue May 01, 2008 7:40 pm
por Wilson-CPS
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
>>
>
>