Runtime error 201 in TBinaryField.GetAsVariant in fields.inc
Original Reporter info from Mantis: eara
-
Reporter name: Stratis Aravias
Original Reporter info from Mantis: eara
- Reporter name: Stratis Aravias
Description:
I try to open an empty table where i have a column VARBINARY(16) in MySQL
and i get range check error in TBinaryField.GetAsVariant in fields.inc on line 2234
2226: function TBinaryField.GetAsVariant: Variant;
2227: var B: TBytes;
2228: P: Pointer;
2229: begin
2230: B := GetAsBytes;
2231: Result := VarArrayCreate([0, length(B)-1], varByte);
2232: P := VarArrayLock(Result);
2233: try
2234: Move(B[0], P^, length(B)); /// <<<<<<<<<<<<
2235: finally
2236: VarArrayUnlock(Result);
2237: end;
2238: end;
in my debugger B variable is (), and length(b) is 0, so Result:=VarArrayCreate([0,-1],varByte) seems not "healthy"...
Mantis conversion info:
- Mantis ID: 26012
- OS: windows 7
- OS Build: 32 bits
- Build: SVN: 44303
- Version: 2.6.4
- Fixed in version: 2.6.4
- Target version: 2.6.4