www.pudn.com > kaoshi.rar > DBHelper.cs, change:2007-10-19,size:441b


using System; 
using System.Collections.Generic; 
using System.Text; 
using System.Data.SqlClient; 
 
namespace MySchool 
{ 
    // 存放数据库连接字符串和数据库连接对象 
    class DBHelper 
    { 
        // 数据库连接字符串 
        public static string connStr = "Data Source=.;Initial Catalog=MySchool;User ID=sa;Pwd=sa"; 
        // 数据库连接对象 
        public static SqlConnection connection = new SqlConnection(connStr); 
    } 
}