ZReadOnlQuery's refersh vs. Close-Open

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
trob
Senior Boarder
Senior Boarder
Posts: 51
Joined: 20.03.2007, 02:24

ZReadOnlQuery's refersh vs. Close-Open

Post 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]
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.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Post Reply