using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Configuration;

namespace KstSoft.DBUtility
{
    public abstract class PubConn
    {

        public static string ConnectionString
        {
            get { return Get_Connstr(); }
        }

        private static string Get_Connstr()
        {
            string Result = string.Empty;
            string DBType = WebConfigurationManager.AppSettings["DBType"];
            if (DBType != "0" && DBType != "1")
            {
                DBType = "1";
            }
            if (DBType == "1")
            {
                string OLE_dbpath = WebConfigurationManager.AppSettings["DBPath"];
                string OLE_ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + HttpContext.Current.Server.MapPath(OLE_dbpath);
                Result = OLE_ConnStr;
            }
            else
                Result = "";
            return Result;
        }
    }
}
