Example #1
0
        private void Export()
        {
            string sScript = string.Empty;
            string sPath = string.Empty;
            try
            {

                if (txtHost.Text.Length == 0 || txtPassword.Text.Length == 0 || txtUser.Text.Length == 0)
                {
                    return;
                }

                OracleManager oOracle = new OracleManager(txtHost.Text, txtUser.Text, txtPassword.Text, chkIntegratedSecurity.Checked);

                if (opOracle.Checked)
                {
                    sScript = oOracle.SaveOutputScript_Oracle(gvTablesOracle.GetSeleccionados("chkSel", "TABLE_NAME"));
                }

                if (opSQL2000.Checked)
                {
                    sScript = oOracle.SaveOutputScript_SQL2000(gvTablesOracle.GetSeleccionados("chkSel","TABLE_NAME"));
                }

                if (opSQL2005.Checked)
                {
                    sScript = oOracle.SaveOutputScript_SQL2005(gvTablesOracle.GetSeleccionados("chkSel", "TABLE_NAME"));
                }

                do
                {
                    this.SaveFile.ShowDialog();
                    sPath = this.SaveFile.FileName;
                } while (sPath == string.Empty);
                File.AppendAllText(sPath, sScript, Encoding.UTF8);
            }
            catch (IOException ioex)
            {
                throw ioex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
 private void GetTables()
 {
     if (txtHost.Text.Length == 0 || txtPassword.Text.Length == 0 || txtUser.Text.Length == 0)
     {
         return;
     }
     OracleManager oOracle = new OracleManager(txtHost.Text, txtUser.Text, txtPassword.Text, chkIntegratedSecurity.Checked);
     gvTablesOracle.DataSource = oOracle.GetTablesName();
 }