Page 1 of 1

PG8 Blob problem

Posted: 07.11.2005, 23:49
by bali001
Hi,

I've some problem with Zeos 651 PG8 driver bytea/text field handling:
selecting RTF text from bytea/text field causes incorrect result due to DecodeString function

original code:

Code: Select all

function TZPostgreSQLResultSet.GetString(ColumnIndex: Integer): String;
begin
  Result := DecodeString(GetRawString(ColumnIndex));
end;
if i remove DecodeString function it works fine:

Code: Select all

function TZPostgreSQLResultSet.GetString(ColumnIndex: Integer): String;
begin
  Result := GetRawString(ColumnIndex);
end;
DecodeString function comment in source:
"Converts an string from escape PostgreSQL format.
@param Value a string in PostgreSQL escape format.
@return a regular string."

Platform:
Zeosdbo: 6.5.1-alpha_cvs_13-10-2005
Protocol: postgresql-8.x (libpq8x.dll replaced with ODBC 8.1.0 libpq.dll)
IDE: Delphi7
DB: PostgreSQL 8.1.0
OS: Windows XP SP2

Thanks for help
Balazs
//sorry for my English :)

Re: PG8 Blob problem

Posted: 11.11.2005, 12:35
by cnliou
Zeosdbo encodes text/varchar values before insert/update by calling PQexec C function provided by libpq.dll. In order to return correct values to ZReadOnlyQuery etc., zeosdbo decodes the text/varchar values after retrieving them from libpq.dll.

The encoding/decoding functions are
EncodeString() and DecodeString().

Did you save your RTF data bypassing zeosdbo :?:

Regards,

CN

Posted: 11.11.2005, 14:28
by bali001
Hi CN!

RTF data insert is correct via zeosdbo (TZQuery).

Balazs

Posted: 17.11.2005, 06:15
by cnliou
We made some changes on line 585 for dbc/ZDbcPostgreSqlResultSet.pas.
Please try cvs version and see if this problem still persists.

Regards,

CN

Posted: 17.11.2005, 09:57
by Michael
FYI:

Some more changes have been made. They have to be tested and then committed to CVS. After that a new CVS-Build will be released, soon.

Please be patient and stick to us ...

Posted: 17.11.2005, 10:59
by bali001
thank you CN and thank you Michael

I will be patient and stick to you :D

Balazs