Hi Kevin & Jon!
Thanks a lot for your responses. -- Sorry for not being back before, but
I've been busy with other [less interesting!] work....
Anyway: yes, it was the column type that was wrong in my code. After
changing it to wchar / nchar it works fine with whistles, horns and
everything.
Just a related question: When submitting INSERT or UPDATE statements to a
database in the "parameter way" (i.e. not writing the actual data values
directly in the statement), can I be sure that my values are correctly
wrapped in quotes (or whatever is needed), so I don't get security flaws
through SQL injections?
Cheers,
~Morten
"Kevin Yu [MSFT]" <v-kevy@online.microsoft.com> skrev i en meddelelse
news:exIuqrKMEHA.2364@cpmsftngxa10.phx.gbl...
[quoted text, click to view] > Thanks for Jon's quick response!
>
> Hi Morten,
>
> First of all, I would like to confirm my understanding of your issue. From
> your description, I understand that you were unable to insert records with
> Chinese characters. If there is any misunderstanding, please feel free to
> let me know.
>
> Based on the code you have provided, I think the problem has something to
> do with the type you specified for the parameter. The type currently used
> is System.Data.OleDb.OleDbType.Char. This type doesn't support Unicode. So
> please try to use System.Data.OleDb.OleDbType.WChar. If you are using the
> Sql provider, please use System.Data.SqlClient.SqlDbType.NChar.
>
> For more information, please check the following links:
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
> frlrfsystemdataoledboledbtypeclasstopic.asp
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
> frlrfsystemdatasqldbtypeclasstopic.asp
>
> HTH. If anything is unclear, please feel free to reply to the post.
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>