示例#1
0
 /// <summary>
 /// Executes query that does not return anything (e.g. UPDATE, INSERT, DELETE).
 /// </summary>
 /// <param name="query"></param>
 public void ExecuteNonQuery(String query)
 {
     // calles SQLite function that executes non-query
     CSSQLite.sqlite3_exec(db, query, 0, 0, 0);
     // if there is error, excetion is thrown
     if (db.errCode != CSSQLite.SQLITE_OK)
     {
         throw new Exception("Error with executing non-query: \"" + query + "\"!\n" + CSSQLite.sqlite3_errmsg(db));
     }
 }