C# sqlite执行sql
C# sqlite执行sql
/// <summary> /// 执行增删改查操作 /// </summary> /// <param name="sql">查询语言</param> /// <returns></returns> public static int ExecuteNonQuery(string db, string sql) { try { SQLiteCommand cmd; cmd = new SQLiteCommand(sql, dbConnection(db)); cmd.ExecuteNonQuery().ToString(); return 1; } catch (Exception ex) { Console.WriteLine("ExecuteNonQuery(" + sql + ")Err:" + ex.Message); return 0; } finally { closeConn(); } }
###########################
QQ 3087438119