当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - SqlCeCommand.CommandText always fails to parse query, tokens are random characters

问题描述:

I am using a SqlCeConnection and trying to use a SqlCeCommand to do a ExecuteNonQuery. Even the most simplest queries are failing to parse and it all seems to do with the text/strings themselves.

All my PC settings are set to my usual culture settings (UK) and even checking Thread.CurrentThread.CurrentCulture shows "en-GB".

Every other parsing errors I have come across on Stack Overflow and other places are due to literal errors in the string, forgetting a space or using a keyword etc. but even a simple select on mine shows invalid tokens in the string, usually chinese characters or other unexpected characters.

Is it anything to do with character encodings or other settings like that I am simply missing?

分享给朋友:
您可能感兴趣的文章:
随机阅读: