Hi.
We have a sql server db that we need to store Unicode text in. The fields are of the type nvarchar, ntext and nchar. Our solution uses both Oracle and SqlServer as a backing database. In Oracle there is a connection string switch "Unicode=True" that fixes the problem. Is there something similar in SqlServer? Since the db layer is generic we'ed like to avoid using a N' prefix on text strings in query statements.
Hi Kim,
As far as I can see, when the fields types are set to such as NVarChar and the update parameters have been set to the corresponding type, the data will be updated as Unicode in SQL Server. When updating the database, the N' prefix will be added automatically by ADO.NET.
That means you don't need to add anything additional to achieve this.
Are you getting some problem when updating the data in the way I mentioned? If so, please let me know the problem. Thanks!
|||Hi Kevin,
Thank you for the response. The problem is that this is a system that's gone into production. The code is not written by me and I'm sorry to say it doesn't use command parameters for transfering variables. I guess the fix will have to wait until the next upgrade.
No comments:
Post a Comment