Mono.Data.Sqlite exception on Database

MuthuRajMuthuRaj USMember ✭✭
edited May 2015 in General

Xamarin.ios update 8.9 stable version not working properly. Getting exception on accessing database using Mono.Data.Sqlite

Exception:
Attempting to JIT compile method 'Mono.Data.Sqlite.SqliteConnection:CreateCommand ()' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.
public int DoSimpleCommand(string[] commands) { int rowsaffected = 0; connection.Open(); try { using (SqliteCommand cmd = connection.CreateCommand()){ cmd.CommandText = "begin"; cmd.ExecuteNonQuery(); foreach (string command in commands) { cmd.CommandText = command; if (this._params != null) { foreach (SqlParameter param in _params) { cmd.Parameters.AddWithValue(param.ParameterName, param.Value); } } rowsaffected += cmd.ExecuteNonQuery(); } cmd.CommandText = "end"; cmd.ExecuteNonQuery(); } // SQLiteCommand cmd = connection.CreateCommand(); } catch (Exception ex) { FileAccess.WriteToLogFile(String.Format("Do Simple Command multiple exception - {0} ST {1}", ex.Message, ex.StackTrace)); rowsaffected = -1; } finally { connection.Close(); } return rowsaffected; }

Sign In or Register to comment.