0 Replies Latest reply on Jul 4, 2002 3:08 AM by Sergei Batiuk

    Windows-1251 encoding problem with JBossCMP + MS SQL Server

    Sergei Batiuk Newbie


      JBossCMP implementation of EJB 2.0 seems to be great!

      However, I encountered an encoding problem using JBossCMP with Microsoft SQL Server 2000 with the JDBC driver from Microsoft. When I ejbCreate() a new CMP entity using JBossCMP, I have strange symbols in my database. When I work directly via JDBC, everything is fine.

      My system is:

      Windows 2000 Professional
      JBoss 3.0.0
      Tomcat 4.0.3 (other JVM)
      Microsoft JDBC Driver

      DB Server:
      Windows 2000 Advanced Server
      Microsoft SQL Server 2000 Enterprise

      I suspect MS JDBC Driver is causing the problem rather than JBoss. I had the same problem using PreparedStatement/MS JDBC Driver/MS SQL Server 2000, and am still confused why that happened. It works OK now. However, I have to use NVARCHAR, not VARCHAR.

      Another problem had been 'Cannot start a cloned connection while in manual transaction mode', which was solved by adding ';SelectMethod=cursor' to the connection string for the data source. Maybe there is a driver property setting that makes the encoding works ok?

      Has anyone encountered the same problem with encoding? Does anyone know a workaround?

      Any help is greatly appreciated!

      Sergei Batiuk.