Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.10.0
    • Component/s: Appender
    • Labels:
      None

      Description

      On Mar 6, 2008, at 4:27 PM, Dale King wrote on log4cxx-user:

      I built using visual studio and ran into a couple of problems to report.

      OdbcAppender has unicode issues. There are 3 calls to SQL
      (SQLExecDirect, SQLDiagRec, and SQLDriverConnect) where the paramters
      are based on SQLCHAR. This doesn't work when building for Unicode as
      these functions really call the wide character version. Thes calls
      should have an A appended to the name to call the non unicode version.
      In reality this file should probably be made to work either way.
      ....

        Activity

        Hide
        Curt Arnold added a comment -

        I didn't see the compile failures, but I could predict run-time failure when UNICODE was set. In rev 635687, I changed the code so that exception messages use SQLGetDiagRecA since std::exception::what() returns a char* and used ...W methods for the other methods taking character strings. I have compiled the code in VS 9 and have not checked that it works with iODBC or unixODBC. I also have not tested the appender. The unit test only does the most minimal test and a real test requires a decent amount of set up. Would appreciate any feedback on the changes.

        Show
        Curt Arnold added a comment - I didn't see the compile failures, but I could predict run-time failure when UNICODE was set. In rev 635687, I changed the code so that exception messages use SQLGetDiagRecA since std::exception::what() returns a char* and used ...W methods for the other methods taking character strings. I have compiled the code in VS 9 and have not checked that it works with iODBC or unixODBC. I also have not tested the appender. The unit test only does the most minimal test and a real test requires a decent amount of set up. Would appreciate any feedback on the changes.

          People

          • Assignee:
            Curt Arnold
            Reporter:
            Curt Arnold
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development