本帖最后由 sxycxwb 于 2012-10-23 16:22 编辑
- conn = new SqlConnection(connStr);
- SqlCommand cmd = new SqlCommand(strSelectCmd, conn);
- cmd.Parameters.AddRange(paras);
- conn.Open();
- SqlDataReader dr = cmd.EndExecuteReader(CommandBehavior.CloseConnection);
- return dr;
- SqlDataReader dr = cmd.EndExecuteReader(CommandBehavior.CloseConnection);的作用是干什么?
复制代码 |