Page 1 of 1

unit ZDbcInterbase6Statement, seems like a bug

Posted: 13.09.2017, 12:20
by Fr0sT
unit ZDbcInterbase6Statement contains several fragments of this code:

Code: Select all

    if (FStatementType in [stSelect, stExecProc])
      and (FResultXSQLDA.GetFieldCount <> 0) then
      if not Assigned(LastResultSet) then
        LastResultSet := TZInterbase6XSQLDAResultSet.Create(Self, SQL,
          FStmtHandle, FResultXSQLDA, CachedLob, FStatementType)
    else
      LastResultSet := nil;
Indentation and common sense tells that it should be

Code: Select all

    if (FStatementType in [stSelect, stExecProc])
      and (FResultXSQLDA.GetFieldCount <> 0) then
      if not Assigned(LastResultSet) then
        LastResultSet := TZInterbase6XSQLDAResultSet.Create(Self, SQL,
          FStmtHandle, FResultXSQLDA, CachedLob, FStatementType)
      else // !
    else
      LastResultSet := nil;