#1 2019-04-04 13:14:33

NickX
Member
Registered: 2019-01-25
Posts: 7

Issue with Remote Query

I've been using TQuery with a remote connection and getting some strange results.  String columns are being truncated in some records.  I've traced it through to TSQLDBProxyStatementAbstract.IntFillDataCurrent in SynDB.pas which resets the column width when it comes to a record with an empty value in that column. I've changed it in my copy and that seems to correct the issue.

      ftUTF8, ftBlob: begin
        Len := FromVarUInt32(Reader);
        if not IgnoreColumnDataSize then
          if Len>fColumns[F].ColumnDataSize then
            fColumns[F].ColumnDataSize := Len;
// Changed by NC to remove next 6 lines to leave the column size untouched on reading an empty string
{        if Len = 0 then
        begin
          fColumns[F].ColumnDataSize := 0;
//          fDataCurrentRowValues[F] := nil;
        end
        else   }
          inc(Reader,Len); // jump string/blob content
      end;

Offline

Board footer

Powered by FluxBB