Tony Whyman wrote 26.11.2021 17:13:
Legacy code can often appear "insane" with the benefit of hindsight. The problem is that it exists and it is your starting point. You don't break it without good reason.

  Ok, here is legacy code from TIBSQL.ExecQuery:

  case FSQLType of
    SQLSelect:
    begin
      Call(FGDSLibrary.isc_dsql_execute2(StatusVector,
                            TRHandle,
                            @FHandle,
                            Database.SQLDialect,
                            FSQLParams.AsXSQLDA,
                            nil), True);
      Call(
FGDSLibrary.isc_dsql_set_cursor_name(StatusVector, @FHandle, PChar(FCursor), 0),
        True);
      FOpen := True;
      FBOF := True;
      FEOF := False;
      FRecordCount := 0;
      if FGoToFirstRecordOnExecute then
        Next;
    end;
    SQLExecProcedure:
    begin
      fetch_res := Call(FGDSLibrary.isc_dsql_execute2(StatusVector,
                            TRHandle,
                            @FHandle,
                            Database.SQLDialect,
                            FSQLParams.AsXSQLDA,
                            FSQLRecord.AsXSQLDA), False);
..... and so on.......

As you can see it IS sane and won't be broken so if _current_ IBX code differs from it - the one who "improved" it must be blamed. Firebird team cannot help in this case.

--
  WBR, SD.


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to