> public SqlDataAdapter GetSqlDA(string Sqlstr) { SqlDataAdapter myCommand = new SqlDataAdapter(Sqlstr, _connection); return myCommand; } /// /// 取得数据表 /// /// SQL语句 /// 数据表 public DataTable GetDT(String Sqlstr) { SqlDataAdapter myCommand = new SqlDataAdapter(Sqlstr, _connection); DataSet ds = new DataSet(); try { myCommand.Fill(ds,"table"); } catch(SqlException exc) { DebugBox db = new DebugBox(Sqlstr + "\r\n" + exc.ToString()); db.Show(); } return ds.Tables["table"]; } /// /// 执行语句 /// ///
|