Open GoogleCodeExporter opened 9 years ago
I propose these modifications:
=============================================================
Modify file xq_flag.inc
{$IFDEF VER160} // Delphi 8
{$DEFINE LEVEL4}
{$DEFINE LEVEL5}
{$DEFINE LEVEL6}
{$DEFINE LEVEL7}
{$DEFINE DELPHI8}
{$DEFINE DELPHI}
{$ENDIF}
{$IFDEF VER170} // Delphi 9
{$DEFINE LEVEL4}
{$DEFINE LEVEL5}
{$DEFINE LEVEL6}
{$DEFINE LEVEL7}
{$DEFINE DELPHI2005}
{$DEFINE DELPHI}
{$ENDIF}
{$IFDEF VER180} // Delphi 10
{$IFDEF VER185}
{$DEFINE Delphi2007}
{$ELSE}
{$DEFINE Delphi2006}
{$ENDIF}
{$DEFINE LEVEL4}
{$DEFINE LEVEL5}
{$DEFINE LEVEL6}
{$DEFINE LEVEL7}
{$DEFINE DELPHI7}
{$DEFINE DELPHI}
{$ENDIF}
{$IFDEF VER190}
{$DEFINE Delphi2007Net}
{$ENDIF}
{$IFDEF VER200} // Delphi 12
{$DEFINE Delphi2009}
{$DEFINE LEVEL4}
{$DEFINE LEVEL5}
{$DEFINE LEVEL6}
{$DEFINE LEVEL7}
{$DEFINE DELPHI7}
{$DEFINE DELPHI}
{$ENDIF}
{$IFDEF VER210} // Delphi 14
{$DEFINE Delphi2010}
{$DEFINE LEVEL4}
{$DEFINE LEVEL5}
{$DEFINE LEVEL6}
{$DEFINE LEVEL7}
{$DEFINE DELPHI7}
{$DEFINE DELPHI}
{$ENDIF}
{$IFDEF VER220} // Delphi 15
{$DEFINE DelphiXE}
{$DEFINE LEVEL4}
{$DEFINE LEVEL5}
{$DEFINE LEVEL6}
{$DEFINE LEVEL7}
{$DEFINE DELPHI7}
{$DEFINE DELPHI}
{$ENDIF}
{$IFDEF VER230} // Delphi 16
{$DEFINE DelphiXE2}
{$DEFINE LEVEL4}
{$DEFINE LEVEL5}
{$DEFINE LEVEL6}
{$DEFINE LEVEL7}
{$DEFINE DELPHI7}
{$DEFINE DELPHI}
{$ENDIF}
{$IFDEF Delphi1} {$DEFINE Delphi1Up} {$ENDIF}
{$IFDEF Delphi2} {$DEFINE Delphi2Up} {$ENDIF}
{$IFDEF Delphi3} {$DEFINE Delphi3Up} {$ENDIF}
{$IFDEF Delphi4} {$DEFINE Delphi4Up} {$ENDIF}
{$IFDEF Delphi5} {$DEFINE Delphi5Up} {$ENDIF}
{$IFDEF Delphi6} {$DEFINE Delphi6Up} {$ENDIF}
{$IFDEF Delphi7} {$DEFINE Delphi7Up} {$ENDIF}
{$IFDEF Delphi8} {$DEFINE Delphi8Up} {$ENDIF}
{$IFDEF Delphi2005} {$DEFINE Delphi2005Up} {$ENDIF}
{$IFDEF Delphi2006} {$DEFINE Delphi2006Up} {$ENDIF}
{$IFDEF Delphi2007} {$DEFINE Delphi2007Up} {$ENDIF}
{$IFDEF Delphi2007Net} {$DEFINE Delphi2007NetUp} {$ENDIF}
{$IFDEF Delphi2009} {$DEFINE Delphi2009Up} {$ENDIF}
{$IFDEF Delphi2010} {$DEFINE Delphi2010Up} {$ENDIF}
{$IFDEF DelphiXE} {$DEFINE DelphiXEUp} {$ENDIF}
{$IFDEF DelphiXE2} {$DEFINE DelphiXE2Up} {$ENDIF}
=============================================================
Modify file: xquery.pas
TxqStringField.GetValue
...
{$IFDEF Delphi2006Up}
end else if (SourceField.DataType = ftWideString) or (SourceField.DataType = ftWideMemo) then begin
Result := GetData(@Buffer);
If Result Then
Value := Buffer;
{$ENDIF}
...
TxqStringField.SetAsstring
...
{$IFDEF Delphi2006Up}
end else if (SourceField.DataType = ftWideString) or (SourceField.DataType = ftWideMemo) then begin
FillChar(Buffer, FDataSize, 0);
L := Length(Value);
Move(Value[1], Buffer, L * SizeOf(WideChar));
SetData(@Buffer);
{$ENDIF}
...
and
TCustomxQuery._ReadRecord
...
{$IFDEF Delphi2006Up}
end else if (FieldDefs[I].DataType = ftWideString) or (FieldDefs[I].DataType = ftWideMemo) then begin
Wvs := vs;
Move(Wvs[1], (Buffer + vField.FFieldOffset)^, IMin(FldDef.Size, Length(Wvs)) * SizeOf(WideChar));
{$ENDIF}
...
=============================================================
Original comment by rob...@milliganworld.com
on 14 May 2012 at 6:02
Original issue reported on code.google.com by
rob...@milliganworld.com
on 14 May 2012 at 4:44