我的數據庫(SQL精簡版)的密碼是Y6K<dkq2J)[hf/',@K"!IiQA
當我創造它的實體數據模型連接字符串中我的應用程序的配置將是:使用符號(「),並在數據庫連接字符串號(')
編輯
<add name="OtherEntities" ... Password=""Y6K<dkq2J)[hf/',@K""""!IiQA"" ... />
有報價跡象"
和密碼'
,每一件事情是OK.so我想用Ado.Net SqCelconnection
。
string pass = "???";
string conString =
"Data Source=path\Other.sdf;password='" + pass + "';";
using (SqlCeConnection connection = new SqlCeConnection(conString))
{
.
如何更換"
標誌和密碼'
標誌?
我已經試過\"
,\"\"
,"
對於"
標誌。
and ''
and '
for '
sign.but does not work。
檢查更新3以下答案:http://stackoverflow.com/a/3177871/55209 –
你必須選擇。第一個使用不同的密碼,第二個使用轉義字符。 –
@Ramhound:我不會改變通 – KF2