www.pudn.com > AlumniWeb.rar > DBHelper.cs


using System; 
using System.Configuration; 
using System.Data; 
using System.Data.SqlClient; 
using System.Data.OracleClient; 
using System.Data.OleDb; 
using System.Data.Odbc; 
using System.Collections; 
 
namespace DBHelper 
{ 
	///  
	/// Summary description for DBHelper. 
	///  
	public abstract class DBHelper 
	{ 
		///数据库的类型 
		private static string _dbType = ""; 
 
		///取得不同数据库的连接字符串; 
		public static readonly string SQLCONNENTSTRING    = ConfigurationSettings.AppSettings["SQLCONNENTSTRING"]; 
		public static readonly string ORACLECONNENTSTRING = ConfigurationSettings.AppSettings["ORACLECONNENTSTRING"]; 
		public static readonly string ODBCCONNENTSTRING   = ConfigurationSettings.AppSettings["ODBCCONNENTSTRING"]; 
		public static readonly string OLEDBCONNENTSTRING  = ConfigurationSettings.AppSettings["OLEDBCONNENTSTRING"]; 
 
		///为缓存数据库的参数创建缓冲表; 
		public static Hashtable paramCache = Hashtable.Synchronized(new Hashtable()); 
 
		public static string DBType 
		{ 
			get 
			{ 
				return _dbType; 
			} 
			set 
			{ 
				_dbType = value; 
			} 
		} 
	} 
}