Sqlstr">SQL语句 /// public object ExecWithValue(String Sqlstr) { object result=null; _connection.Open(); SqlCommand myCommand = new SqlCommand(Sqlstr, _connection); try { result=myCommand.ExecuteScalar(); } catch (SqlException exc) { DebugBox db = new DebugBox(Sqlstr + "\r\n" + exc.ToString()); db.Show(); //MessageBox.Show(exc.Message); } _connection.Close(); return result; } /// /// 返回相应的行数 /// /// SQL语句 /// 行数 public int Exec(String Sqlstr) { int sucess=0; SqlCommand myCommand = new SqlCommand(Sqlstr, _页码:[1] [2] [3] [4] [5] [6] [7] [8] [9] 第7页、共9页 |