コード例 #1
0
        public static SqlTableItemXml AddTable(string currentconnstr, SqlServerItemXml item, SqlDatabaseItemXml item2)
        {
            var             basemodel      = DBConfig.GetBaseXmlConfig(item.BaseNumber);
            SqlTableItemXml tabletempmodel = new SqlTableItemXml();

            tabletempmodel.BaseNumber     = item.BaseNumber;
            tabletempmodel.ServerNumber   = item.Number;
            tabletempmodel.DataBaseNumber = item2.Number;
            tabletempmodel.Number         = DBConfig.GetTableNumber;
            tabletempmodel.TableName      = basemodel.TablePrev + tabletempmodel.Number;
            tabletempmodel.IsWrite        = true;
            tabletempmodel.IsUse          = true;
            tabletempmodel.RowNum         = basemodel.DefaultTableRowNum;
            tabletempmodel.StorageSize    = (item2.StorageSize - item2.StorageSize / 5) / item2.TableNum;
            DBConfig.TableAdd(basemodel, tabletempmodel);
            DBProxy.GetDBHelper(item.DBType).ExecuteSql(currentconnstr, DBConfig.GetTableSql(basemodel, tabletempmodel.TableName));
            return(tabletempmodel);
        }