Exemplo n.º 1
0
        private void BtnNext_Click(object sender, EventArgs e)
        {
            string qry = txtQRY.Text;

            if (qry.Substring(0, 6).ToUpper() == "SELECT" ||
                qry.Substring(0, 4).ToUpper() == "SHOW")
            {
                try
                {
                    frmQueryResults qr = new frmQueryResults(dc, qry);
                    qr.Show();
                }
                catch (Exception) { }
            }

            else
            {
                try
                {
                    dc.SqlExecute(qry);
                    MessageBox.Show("Query Execution Complete");
                }
                catch (Exception ex) { MessageBox.Show("Query Failed\n" + qry + "\n" + ex.ToString()); this.Close(); }
            }
        }
Exemplo n.º 2
0
 private void showTablesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (mc != null)
     {
         try
         {
             frmQueryResults qr = new frmQueryResults(mc, "Show Tables;");
             qr.Show();
         }
         catch (Exception) { }
     }
     else if (jc != null)
     {
         try { frmShowJetTables sjt = new frmShowJetTables(jc); sjt.Show(); }
         catch (Exception) {}
     }
     else if (lc != null)
     {
         try
         {
             frmQueryResults qr = new frmQueryResults(lc, "SELECT NAME from sqlite_master;");
             qr.Show();
         }
         catch (Exception) { }
     }
 }
Exemplo n.º 3
0
 private void Proceed()
 {
     try
     {
         MySQLConnection mc  = (MySQLConnection)dc;
         string          qry = "SELECT TABLE_NAME, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='" + mc.DatabaseName + "' AND COLUMN_NAME LIKE '%" + txtSearch.Text + "%';";
         frmQueryResults qr  = new frmQueryResults(mc, qry);
         qr.Show();
     }
     catch (Exception) { }
 }