Page 1 of 1

ZeosLib 7.1 + XE4 + PostGreSql returns no data

Posted: 05.06.2013, 20:45
by rudimar
Hi,

I'm using ZeoLib 7.1 + XE4 + PostGreSql returns no data,

returns table fields, but not the data, why is it?

and the table is not empty.

Posted: 06.06.2013, 13:03
by EgonHugeist
rudimar,

since XE3 Set/GetFieldData using a TValueBuffer. Now i had a look to Zeos.Inc. I'm affraid the one who made the XE4 modifikations did add {$UNDEF WITH_TVALUEBUFFER} to the {DELPHI18_UP} section. Can you comment it by {.$UNDEF WITH_TVALUEBUFFER}, recompile and check if the Data is available again?

Posted: 06.06.2013, 18:03
by rudimar
Egon,

I check,

sorry, where exactly is this session? What Unit?

Posted: 06.06.2013, 23:30
by EgonHugeist
rudimar,

open file (Your Zeos directory)\src\zeos.inc

goto {$UNDEF WITH_TVALUEBUFFER} in Delphi18 section:

Code: Select all

{$IFDEF DELPHI18_UP}
  {$UNDEF WIDE_DATASET}                // TWideDataset and TDataSet are merged together: https://forums.embarcadero.com/thread.jspa?messageID=499588
  {$DEFINE WITH_TVALUEBUFFER}          // SetFieldData/GetFieldData and Parameters using TValueBuffer instead of Pointer
  {$DEFINE WITH_BOOKMARKDATA_TBOOKMARK}
  {$UNDEF WITH_WIDESTRINGS_GETFIELDNAMES} //GetFieldNames with TWideStrings has been removed
  {$UNDEF WITH_TVALUEBUFFER}
  {$DEFINE WITH_SYSUITLS_PREFIX} 	//Need SysUtils. unit declaration for some functions like StrNew,StrAlloc
{$ENDIF}
and comment this line like this: {.$UNDEF WITH_TVALUEBUFFER}

Recompile, and check if it works..

Posted: 07.06.2013, 03:06
by rudimar
Hi,

[dcc32 Error] ZAbstractRODataset.pas(440): E2037 Declaration of 'GetFieldData' differs from previous declaration

Code: Select all

function GetFieldData(Field: TField; Buffer: {$IFDEF WITH_TVALUEBUFFER}TValueBuffer{$ELSE}Pointer{$ENDIF}): Boolean; override;

function GetFieldData(Field: TField; Buffer: {$IFDEF WITH_TVALUEBUFFER}TValueBuffer{$ELSE}Pointer{$ENDIF};

Posted: 08.06.2013, 19:56
by EgonHugeist
rudimar,

i've commited a "theoretical" patch: R2287 /testing7.1 (SVN)

see http://docwiki.embarcadero.com/Librarie ... tFieldData

Please update and report if it works now.