重寫了微軟提供SQLHelper(共用的數(shù)據(jù)庫調(diào)用接口) 1把SqlHelper的connectionString做成一個(gè)全局量,統(tǒng)一設(shè)置數(shù)據(jù)庫連接字符串 2增加了返回特定表名的DataSet的各接口。 可在項(xiàng)目的config文件設(shè)置數(shù)據(jù)庫連接字符串 private static string connectionString = System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"] <!-- application specific settings --> <appSettings> <add key="ConnectionString" value="packet size=4096 user id=sa data source=localhost persist security info=True initial catalog=NorthWind password= "/> </appSettings> 當(dāng)然可以把數(shù)據(jù)庫連接方法修改后直接用。
標(biāo)簽:
connectionString
SQLHelper
SqlHelper
微軟
上傳時(shí)間:
2013-12-12
上傳用戶:釣鰲牧馬