When value is null or is empty function raise ERangeCheckError. Please path the sources. (ZeosDBO 6.6.0 - beta)
function TZPostgreSQL8PlainDriver.DecodeBYTEA(value: string): string;
var decoded,dest:pchar;
len:Longword;
von,nach:string;
begin
decoded:=ZPlainPostgreSql8.PQunescapeBytea(pansichar(value),@len);
SetLength(result,len);
dest:=pchar(result);
if len>0 then Move(decoded^,result[1],len);
ZPlainPostgreSql8.PQFreemem(decoded);
end;
Regards
Krzysztof
ERangeError ZQuery.Open in ZPlainPostgreSqlDriver
Moderators: gto, cipto_kh, EgonHugeist
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Hi piornik,
This error has already been reported a few times.
Now the code in our repository looks like this :
It will be in next release.
If you take the most recent SVN build (Trunk) it should be OK. (See release announcement for a link)
Mark
This error has already been reported a few times.
Now the code in our repository looks like this :
Code: Select all
function TZPostgreSQL8PlainDriver.DecodeBYTEA(value: string): string;
var decoded:pchar;
len:Longword;
begin
decoded:=ZPlainPostgreSql8.PQUnescapeBytea(pansichar(value),@len);
SetLength(result,len);
if (len > 0) then Move(decoded^,result[1],len);
ZPlainPostgreSql8.PQFreemem(decoded);
end;
If you take the most recent SVN build (Trunk) it should be OK. (See release announcement for a link)
Mark