================================================================================
//               ZEOS Library Bug Reporting / Bug Fixing Form                 //
================================================================================

Bug ID               : 1102816                      Priority      : 5
Submitted by         : charsoe                      Date Submitted: 2005-01-15 08:21
Quality assurance by : stefanglienke                Closed as of  : 2005-06-08 15:40
Assigned to          : stefanglienke                Closed by     : stefanglienke

--------------------------------------------------------------------------------

Server (and Version) : n/a
ZEOSLib Version      : 6.5.1 alpha
Component/Class      : TZAbstractRODataset

--------------------------------------------------------------------------------

Error Description:

The bug related to Widestring Field which will always 
return Null if you try to access property Value. This bug 
is like the one submitted by fabianbecker.

I'm using:
ZeosDBO 6.1.5 with Patch 1 and Patch 2 applied. I think 
the bug still exist on ZeosDBO 6.5.1

Bug description:
Filename : ZAbstractRODataset.pas
Line number: 1140

Class : TZAbstractRODataset
Function : function GetFieldData(Field: TField; Buffer: 
Pointer): Boolean;
{**
Retrieves the column value and stores it into the field 
buffer.
@param Field an field object to be retrieved.
@param Buffer a field value buffer.
@return <code>True</code> if non-null value was 
retrieved.
}

For Field.DataType = ftWideString, this function will 
return false if non-null value was retrieved and
return true if null value was retrieved. Result is passed 
as parameter "IsNull" in function
RowAccessor.GetUnicodeString.

Original Code:
ftWideString:
begin
PWideString(Buffer)^ := 
RowAccessor.GetUnicodeString(ColumnIndex, Result)
end;


Bug fix:
Add code to negate the Result.

Code:
ftWideString:
begin
PWideString(Buffer)^ := 
RowAccessor.GetUnicodeString(ColumnIndex, Result);

{ Added by Charles Soeryapranata }
Result := not Result;
end;

--------------------------------------------------------------------------------

Actions done form Bugfixing:

Added Result := not Result; as described

================================================================================


