This content has been marked as final. Show 1 reply
Well, that's an awfully complicated test of SQL Server. There's a lot of other things that might go wrong -- especially your #2 which looks a lot like a cheap hack which might occasionally work if you're lucky but is usually a recipe for disaster.
So why don't you do a simpler test? Put a constant string into a test program -- make sure to use Unicode escapes rather than relying on having a correct encoding in your source code -- and try writing it to SQL Server. Also make sure you're using the right parameter name for the charset. (I have no idea what's correct or even if there is one.) You should only accept solutions where #5a works, not that ugly hack which is #5b.