I'm having difficulty with unicode characters saving to SQL Server 2008 R2. I'm using an EntityManager to persist or merge the entity object which successfully updates and saves to the database but the NVARCHAR column that is used to store unicode characters (in this case a Chinese character) are showing the value as a question mark (or multiple question marks if inserting multiple Chinese characters).
I can edit the DB column in SQL Server directly to confirm that the unicode character can be stored and retrieved correctly. I've debugged and confirmed the entity object has the correct unicode characters before the merge or persist. I have run SQL Profiler to debug the sql statement and the update statement built by the JPA shows the value as a question mark. Here is what SQL Profiler is showing me...note the question mark after the datetime: declare @p1 int set @p1=85 exec sp_prepexec @p1 output,N'@P0 datetime2,@P1 varchar(8000),@P2 bigint',N'UPDATE AAVS000_MESSAGE SET AVS000_LAST_UPDT_S = @P0, AVS000_VALUE_C = @P1 WHERE AVS000_PK_B = @P2 ','2014-01-28 19:20:59.1640000','?',11 select @p1 I've also tried setting the JDBC parameter "sendStringParametersAsUnicode" to true but that didn't work and I also tried adding to the @Column on the entity with columnDescription="NVARCHAR(50)" with no luck either. I'm using OpenJPA 2.2.2 with Rational Software Architect Websphere 8.0 and SQL Server 2008 R2. I'm hoping that someone here has run across this issue and resolved it or has some suggestions. Thanks for your time, Matt B. -- View this message in context: http://openjpa.208410.n2.nabble.com/Merge-or-Persist-Unicode-values-to-MS-SQL-Server-2008-R2-tp7585896.html Sent from the OpenJPA Users mailing list archive at Nabble.com.