Beispiel #1
0
        public override void Run(object context)
        {
            DbController dbc = null;

            try
            {
                Log(DbDefault.GetCreateViewStatement(Relation.CUSTOMER_ADDRESS));

                dbc = new DbController(Connection);
                dbc.CreateView(Relation.CUSTOMER_ADDRESS);

                DataTable table = Connection.GetSchema("Views");

                if (table.Rows.Count <= 0)
                {
                    Fail("GetSchema('Views') did not return information.");
                }


                table.Clear();
                Command.CommandText = "SELECT * FROM " + Relation.CUSTOMER_ADDRESS.ToString();
                DataAdapter.Fill(table);

                ParseDataTable(table);
            }
            catch (Exception e)
            {
                Fail(e);
            }
            finally
            {
                dbc.DropView(Relation.CUSTOMER_ADDRESS.ToString());
                base.Run(context);
            }
        }