internal static void ExecuteNonQuery(string sql,string _mdbpath)
        {
            string connopen = string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};", _mdbpath);
            OleDbConnection conn = null;               //新建连接,初始化为空
            OleDbTransaction trans = null;             //新建事务,初始化为空
            try
            {
                conn = new OleDbConnection(connopen);   //添加链接
                conn.Open();                                     //打开连接
                OleDbCommand comm = conn.CreateCommand();        //新建command
                comm.CommandText = sql;                          //用SQL语句初始化command文本
                trans = conn.BeginTransaction();                 //开始事务-------------?
                comm.Transaction = trans;                        //设置所要执行的事务---------?
                comm.ExecuteNonQuery();                          //执行查询,返回受影响的行数
                trans.Commit();                                  //提交数据库事务
            }
            catch (Exception ex)
            {
                if (trans != null)
                    trans.Rollback();                            //判断事务是否为空,否则回滚
                //throw ex;                   //抛出异常
            }
            finally
            {
                if (conn != null && conn.State == ConnectionState.Open)     //检查连接状态
                    conn.Close();           //关闭连接
            }
        }