Пример #1
0
        public void Initialize(DataTable schemaTable, TableInitializationOptions options)
        {
            if ((options & TableInitializationOptions.Drop) != 0)
            {
                Drop();
            }

            LoadColumnsFromSchemaTable(schemaTable);

            if ((options & TableInitializationOptions.Append) != 0)
            {
                if (!VerifyColumns(true))
                {
                    throw new SchemaException("Table is to be appended but schemas do not match.");  // *** TODO
                }
            }
            else if ((options & TableInitializationOptions.Create) != 0)
            {
                Create();
            }
            else
            {
                // *** TODO: implement other options
                throw new NotImplementedException();
            }

            if ((options & TableInitializationOptions.Clear) != 0)
            {
                Truncate();
            }
        }
Пример #2
0
 private void CopyMembers(DestinationTable old)
 {
     this.dataset      = old.dataset;
     this.databaseName = old.databaseName;
     this.schemaName   = old.schemaName;
     this.tableName    = old.tableName;
     this.options      = old.options;
 }
Пример #3
0
 private void InitializeMembers()
 {
     this.dataset      = null;
     this.databaseName = null;
     this.schemaName   = null;
     this.tableName    = null;
     this.options      = TableInitializationOptions.Create;
 }
Пример #4
0
        public DestinationTable(SqlServerDataset dataset, string databaseName, string schemaName, string tableName, TableInitializationOptions options)
        {
            InitializeMembers();

            this.dataset = dataset;
            this.databaseName = databaseName;
            this.schemaName = schemaName;
            this.tableName = tableName;
            this.options = options;
        }
Пример #5
0
        public DestinationTable(SqlServerDataset dataset, string databaseName, string schemaName, string tableName, TableInitializationOptions options)
        {
            InitializeMembers();

            this.dataset      = dataset;
            this.databaseName = databaseName;
            this.schemaName   = schemaName;
            this.tableName    = tableName;
            this.options      = options;
        }
Пример #6
0
        public void Initialize(DataTable schemaTable, TableInitializationOptions options)
        {
            if ((options & TableInitializationOptions.Drop) != 0)
            {
                Drop();
            }

            LoadColumnsFromSchemaTable(schemaTable);

            if ((options & TableInitializationOptions.Append) != 0)
            {
                if (!VerifyColumns(true))
                {
                    throw new SchemaException("Table is to be appended but schemas do not match.");  // *** TODO
                }
            }
            else if ((options & TableInitializationOptions.Create) != 0)
            {
                Create();
            }
            else
            {
                // *** TODO: implement other options
                throw new NotImplementedException();
            }

            if ((options & TableInitializationOptions.Clear) != 0)
            {
                Truncate();
            }
        }
Пример #7
0
 private void InitializeMembers()
 {
     this.dataset = null;
     this.databaseName = null;
     this.schemaName = null;
     this.tableName = null;
     this.options = TableInitializationOptions.Create;
 }
Пример #8
0
 private void CopyMembers(DestinationTable old)
 {
     this.dataset = old.dataset;
     this.databaseName = old.databaseName;
     this.schemaName = old.schemaName;
     this.tableName = old.tableName;
     this.options = old.options;
 }