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]
ZReadOnlQuery's refersh vs. Close-Open
Moderators: gto, cipto_kh, EgonHugeist
ZReadOnlQuery's refersh vs. Close-Open
You do not have the required permissions to view the files attached to this post.
Last edited by trob on 17.07.2007, 00:22, edited 1 time in total.