TZQuery does not generate a change of text blob field - #104
Conversation
|
Hello Nick, which driver do you use to trigger this bug? I think it might be a problem in the implementation of the driver. I am not sure, your changes are the right way to fix this. Could you maybe open a bugreport on Sourceforge and provide a sample application and a database create script that triggers the bug? Best regards, Jan |
|
Ok. I will do it. I am using Firebird - ODBC- TZConnection - TZQuery - TWideMemoFiled - TWideMemo for edit |
|
Problem in different TMemoryStream implementation in different versions of Delphi. In XE3 TMemoryStream has 2 "write" method (witch are needed to override): In Delphi 11 TMemoryStream has only one "write" method, witch already overridden by TZVarVarLenDataRefStream: Now TZVarVarLenDataRefStream override only one method "write" and it incorrect works in Delphi XE3: |
|
Open again. Bug actually in XE3 version of Delphi |
|
My finally result. Override two methods: And clear dest stream before CopyFrom (because copyfrom only overwrites data, does not change capacity if dest stream bigger than src) in TZAbstractRWDataSet.PSUpdateRecord.CopyRecord: |
TZQuery does not generate a change of text blob field by TWideMemo->TWideMemoField when new string length small or equal to old value
In TZVarVarLenDataRefStream need to override second Write method, becouse TWideMemoFiled used WriteBuffer to set data:
And TStream.WriteBuffer used Write method with three parameters:
And in TZVarVarLenDataRefStream.Write need to realloc FVarLenDataRef.VarLenData (without set new capacity AccesViolation raised)