Remap fldBCD when option coEnableBCD = osOff

2005-08-19
2013-05-01
  • Sebastien78

    Sebastien78 - 2005-08-19

    In OdbcDataTypeToDbxType procedure, I was Still receiving BCD field type after turning off coEnableBCD option.

    when parameter aSqlType = SQL_NUMERIC or SQL_DECIMAL it was initializing DbxType to fldBCD anyway.

    Look what I done to correct the situation from my side, to prevent this situation.

      case aSqlType of
        SQL_INTEGER:
          DbxType := fldINT32;

    ...

        SQL_NUMERIC, SQL_DECIMAL:
          begin
            if (SqlConnectionOdbc<>nil)
               and (SqlConnectionOdbc.fConnectionOptions[coEnableBCD] = osOff) then
            begin
              DbxType := fldFLOAT;
            end
            else
            begin
              DbxType := fldBCD;
            end;

          end;

    Orignial Code

        SQL_NUMERIC, SQL_DECIMAL:
          DbxType := fldBCD;

     
    • Vadim V.Lopushansky

      It agree, it is necessary to synchronize / combine a code "procedure TSqlCursorOdbc.BindResultSet" and "procedure OdbcDataTypeToDbxType" !!!

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks