摘要: string myConnectString = "Persist Security Info=False;Integrated Security=SSPI;database=northwind;server=mySQLServer;Connect Timeout=30"; SqlConnection myConnection = new SqlConnection(myConnectStrin... 阅读全文
posted @ 2013-02-17 20:54 ccczqh 阅读(150) 评论(0) 推荐(0)
摘要: SqlHelper 类实现详细信息 SqlHelper 类用于通过一组静态方法来封装数据访问功能。该类不能被继承或实例化,因此将其声明为包含专用构造函数的不可继承类。 在 SqlHelper 类中实现的每种方法都提供了一组一致的重载。这提供了一种很好的使用 SqlHelper 类来执行命令的模式,同时为开发人员选择访问数据的方式提供了必要的灵活性。每种方法的重载都支持不同的方法参数,因此... 阅读全文
posted @ 2013-02-17 19:46 ccczqh 阅读(243) 评论(0) 推荐(0)