Page 1 of 1

ZReadOnlQuery's refersh vs. Close-Open

Posted: 16.07.2007, 20:38
by trob
I have a ReadOnlyQuery with date fields. Some of the fileds are NULL.
When is call Refresh, i get an error message (see below). But when i call Close, and then Open, i don't get the error.
Why is that? What's the difference?


And it stopped here in unit ZDbcMySqlResultSet:
[php]
function TZMySQLResultSet.IsNull(ColumnIndex: Integer): Boolean;
var
Temp: PChar;
begin
{$IFNDEF DISABLE_CHECKING}
CheckClosed;
if FRowHandle = nil then
raise EZSQLException.Create(SRowDataIsNotAvailable);
{$ENDIF}

Temp := FPlainDriver.GetFieldData(FRowHandle, ColumnIndex - 1);
Result := (Temp = nil);
if not Result and (TZAbstractResultSetMetadata(Metadata).
GetColumnType(ColumnIndex) in [stDate, stTimestamp]) then
begin
Result := (AnsiSQLDateToDateTime(Temp) = 0) #<===== stopped here
and (MySQLTimestampToDateTime(Temp) = 0);
end;
end;
[/php]

Posted: 16.07.2007, 21:03
by mdaems
Looks like Visor's recent problem. Can you make a small sample program and the data creation script? Zip everything together and attach it to a bug report on zeosbugs.firmos.at

Mark