Exemplo n.º 1
0
        public static Database CreateDatabase()
        {
            Database db;
            SettingItems settings = AppSettings.Load();
            if (settings == null)
                settings = AppSettings.LoadDefault();

            string strDBType = settings.DBType;

            if (strDBType == "SQL Server")
                db = new SqlDatabase();
            else
                db = new OracleDatabase();

            return db;
        }
Exemplo n.º 2
0
        public static Database CreateDatabase()
        {
            Database     db;
            SettingItems settings = AppSettings.Load();

            if (settings == null)
            {
                settings = AppSettings.LoadDefault();
            }

            string strDBType = settings.DBType;

            if (strDBType == "SQL Server")
            {
                db = new SqlDatabase();
            }
            else
            {
                db = new OracleDatabase();
            }

            return(db);
        }