2017-12-20 5 views
0

私はアンドロイドアプリケーションを開発しています。私はedittextを上にして検索ボタンを使ってlistviewを持っています。このボタンでは、edittextのフィルタ条件に基づいていくつかの行(会社)を表示します。特定の会社を検索して英語で名前を書くと、結果が得られますが、私の場合ブルガリア語でcyrilicの会社を検索すると、次のエラーが表示されます:パラメータ2:パラメータ名が無効です。サイリリックで検索していますか?

The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect.
Parameter 2: The parameter name is invalid.

私は、パラメータ名がSPのパラメータ名と同じであることを確認している以上、誤解を招くことがあります。ここでは、コードのごく一部です:

private void InitCommandCollection() 
{ 
    this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; 
    this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); 
    this._commandCollection[0].CommandTimeout = GS.CommandTimeout; 
    this._commandCollection[0].Connection = this.Connection; 
    this._commandCollection[0].CommandText = "dbo.rsp_ContragentInfo_ByContragentShortName"; 
    this._commandCollection[0].CommandType = global::System.Data.CommandType.StoredProcedure; 
    this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ShortName", global::System.Data.SqlDbType.VarChar, 16, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 
} 

答えて

0

私はあなたの問題が原因でvarchar型のものであってもよいし、あなたはおそらく

nvarchar stores UNICODE data. If you have requirements to store UNICODE or multilingual data, nvarchar is the choice. Varchar stores ASCII data and should be your data type of choice for normal use.

+0

はどうもありがとうございましたnvarchar型を使用する必要があります信じています!私は次回そのことを念頭に置いておきます –

関連する問題