ERangeError ZQuery.Open in ZPlainPostgreSqlDriver
Posted: 10.12.2006, 01:09
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
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