示例#1
0
        public SqlTableEditor(BasicDBServer server)
        {
            m_server = server;
            InitializeComponent();

            LoadTableList();
        }
示例#2
0
        public SqlTableEditor(BasicDBServer server)
        {
            m_server = server;
            InitializeComponent();

            LoadTableList();
            this.dataGrid1.DataError += DataGrid1_DataError;
        }
        /// <summary>
        /// Returns and empty timeseries_hourly table for storing blobs
        /// </summary>
        /// <param name="server"></param>
        /// <returns></returns>
        static DataTable GetBlobTable(Reclamation.Core.BasicDBServer server)
        {
            string sql = SqLiteEnsembleWriter.GetCreateTableSQL(TableName);

            server.RunSqlCommand(sql);

            //server.RunSqlCommand("DELETE from " + TableName);
            return(server.Table(TableName, "select * from " + TableName + " where 1=0"));
        }
示例#4
0
        public SqlView(BasicDBServer server)
        {
            InitializeComponent();
            m_server  = server;
            this.Text = "SQL Viewer";

            this.listBoxSql.Items.Clear();
            this.listBoxSql.Items.AddRange(server.SqlCommands.ToArray());
        }
示例#5
0
        private void EnableMenus()
        {
            Reclamation.Core.BasicDBServer svr = DB.Server;

            if (svr != null)
            {
                menuDatabase.Visible = true;
            }
            else
            {
                menuDatabase.Visible = true;
            }
        }
示例#6
0
 public SqlTableEditor(BasicDBServer server, string[] tableNames = null)
 {
     m_server = server;
     InitializeComponent();
     if (tableNames == null)
     {
         LoadTableList();
     }
     else
     {
         this.comboBoxTableNames.Items.Clear();
         this.comboBoxTableNames.Items.AddRange(tableNames);
     }
 }