Menu

#620 TZQuery does not generate a change of text blob field

8.0.0
open
nobody
None
Bug Report
7 days ago
2025-01-29
No

TZQuery does not generate a change of text blob field by TWideMemo->TWideMemoField when new string length small or equal to old value

DB Firebird 2.5, Protocol ODBC

Try to change text in Memo
from
S:\projects_flutter\dataview\dataview\config\111
to
S:\projects_flutter\dataview\dataview\config\11

P.S. https://github.com/marsupilami79/zeoslib/pull/104

1 Attachments

Discussion

  • MmVisual

    MmVisual - 2025-04-17

    The same problem is with:
    TDBMemo, MariaDB, Lazarus
    The old longer text is not deleted.

     
  • Marcin

    Marcin - 2025-12-01

    Hi,
    I see that TZVarVarLenDataRefStream.Write is not callled from TStream.WriteBuffer, and so FUpdated stays false, if blob is larger then FUpdated is changed by TZVarVarLenDataRefStream.Realloc.

    TStream.WriteBuffer
    executes at line
    LTotalCount := Write(Buffer, Count);
    function
    TMemoryStream.Write(const Buffer; Count: TNativeCount): TNativeCount;
    instead of overriden
    TZVarVarLenDataRefStream.Write

    I even changed declaration of TZVarVarLenDataRefStream.Write to match TMemoryStream called version
    function Write(const Buffer; Count: TNativeCount): TNativeCount; override;
    but it didn't help

    Delphi13 and compiling for 64-bit.

    Hope it helps

     
  • Marcin

    Marcin - 7 days ago

    for me problem only occurs for 64bit target and it seams like changing
    TZCodePageConversionStream.write to

    `function Write(const Buffer; Count:{$IFDEF MEMORYSTREAM_REALLOC_NATIVEINT}NativeInt{$ELSE}Longint{$ENDIF}): {$IFDEF MEMORYSTREAM_REALLOC_NATIVEINT}NativeInt{$ELSE}Longint{$ENDIF}; override;`
    

    solved problem for MySQL under delphi 13, target 64bit

     

Log in to post a comment.