예제 #1
0
        public void SaveDataBase()
        {
            if (!this.IsExistDocSpace())
            {
                string createDataBaseSql = " Create DataBase " + this.DbName;
                var    result            = this.GetDocConfigSqlHelper().ExecuteNonQuery(createDataBaseSql);
            }
            var           instanceDB = SQLHelper.CreateSqlHelper(ConnEnum.InfrasBaseConfig);
            StringBuilder sqlBuilder = new StringBuilder();

            sqlBuilder.Append(" use " + this.DbName + " ");
            sqlBuilder.Append(NodeConfigDDL());
            instanceDB.ExecuteNonQuery(sqlBuilder.ToString());
            sqlBuilder.Clear(); sqlBuilder.Append(" use " + this.DbName + " ");
            sqlBuilder.Append(FileConfigDDL());
            instanceDB.ExecuteNonQuery(sqlBuilder.ToString());
            sqlBuilder.Clear(); sqlBuilder.Append(" use " + this.DbName + " ");
            sqlBuilder.Append(DDLHelper.GetDefaultDDL());
            instanceDB.ExecuteNonQuery(sqlBuilder.ToString());
        }