-
October 14th, 2009, 06:59 AM
#1
Writing UNICODE CString to SQLServer UCS-2
Im needing to write a line of text to a sqlserver table,
The line of text could come from any webpage using any encoding.
Previously I had a problem displaying this text within my application, but could use some conversion functions to display it correctly such as:
CStringA alpha = W2A(mFromText.c_str());
CStringW wide = CA2WEX<>(alpha, GetCodePage());
My program is built using _UNICODE.
I am dynamically constructing an sql statement and using an odbc driver.
Now when the line of text is some other text such as cyrillic alls that is stored in the db is ??????
Prior to the sql being executed the sql string contains the correct text.
How do I store a UNICODE string to sql-server and it preserve its content correctly?
Originally my column type was varchar and then changed to nvarchar but no difference?
Thanks.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|