Monotouch プロジェクトでプリロードされた sqlite DB を使用して、次のクエリを試しています。
select * from my_table where id not in (1,2,3,4) and field not in ('תווים בעברית') order by RANDOM() limit 55;
しかし、私はSQLiteExceptionを取得し続けます。ヘブライ語の文字列を英語の文字に置き換えると、正常に機能します。
この問題を解決するにはどうすればよいですか?
また、まったく同じクエリが Android プロジェクト (Java で記述) でも正常に機能することにも注意してください。
編集 (コード)
var conn = new SQLiteConnection (System.IO.Path.Combine (folder, "mydb.db3"));
string sql = select * from my_table where id not in (1,2,3,4) and field not in ('תווים בעברית') order by RANDOM() limit 55;
IEnumerable<myObject> objects = conn.Query<myObject> (sql.ToString()); //Here is the exception
スローされた例外:
SQLite.SQLiteException:「リム」の近く: SQLite.SQLite3.Prepare2 の構文エラー (IntPtr db、System.String クエリ) [0x00000] in :0 at SQLite.SQLiteCommand.Prepare () [0x00000] in :0 at SQLite.SQLiteCommand +d_ 0
1[MyAppName.Question].MoveNext () [0x00000] in <filename unknown>:0 at System.Collections.Generic.List
1[MyAppName.Question].AddEnumerable (IEnumerable1 enumerable) [0x00000] in <filename unknown>:0 at System.Collections.Generic.List
1[MyAppName.Question]..ctor (IEnumerable1 collection) [0x00000] in <filename unknown>:0 at System.Linq.Enumerable.ToList[Question] (IEnumerable
1 source) [0x00000] in :0 at SQLite.SQLiteCommand.ExecuteQuery[Question] () [0x00000] in :0 SQLite.SQLiteConnection.Query[Question] (System.String クエリ、System.Object[] args) [0x00000] で :0 で MyAppName.DBHelper.getQuestions (Int32 レベル) [0x000f1] で /Users/mmac/Documents/projects /MyAppNameMono/MyAppName/MyAppName/dal/DBHelper.cs:43 at MyAppName.AppDelegate.m/Users/mmac/Documents/projects/MyAppNameMono/MyAppName/MyAppName/AppDelegate.cs:36 の _0 (System.Object ) [0x00002]