Esempio n. 1
0
 /// <summary>
 /// 执行SQL语句
 /// </summary>
 /// <param name="sql">SQL</param>
 public DataSet ExecSql(string sql)
 {
     DataSet result = new DataSet();
     using (_DbHelper conn = new _DbHelper(_conn))
     {
         conn.Open();
         try { result = conn.ExecuteDataSet(sql); }
         catch (Exception err) { throw err; }
         finally { conn.Close(); }
     }
     return result;
 }