Web程序设计作者祁长兴_chapter12课案.pptVIP

  • 18
  • 0
  • 约7.67千字
  • 约 55页
  • 2017-03-03 发布于广东
  • 举报
Web程序设计作者祁长兴_chapter12课案.ppt

12.3.1 公共模块 返回指定SQL语句的DataSet ,具体实现如下 : public static DataSet getDataSet(string strSQL) { DataSet ds = new DataSet(); SqlDataAdapter da = new SqlDataAdapter(); SqlConnection conn = OpenConnection(); 12.3.1 公共模块 try{ SqlCommand comm = new SqlCommand(strSQL, conn); comm.CommandType = CommandType.Text; da.SelectCommand = comm; da.Fill(ds); DisposeConnection(conn); return ds; } catch (Exception e){ DisposeConnection(conn); throw new Exception(e.Message); } } 12.3.1 公共模块 查询数据库中是否存在该条记录,存在返回True,不存在返回False, 具体实现如下 : public

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档