示例#1
0
        private Boolean CreateSDEDatabase()
        {
            Boolean finished = false;

            try
            {
                if ((m_type == NavServerType.Base) && (m_sdeSetupFileName != String.Empty))
                {
                    StringBuilder m_shortPath = new StringBuilder(1000);
                    InstallUtility.GetShortPathName(m_ecpLocation, m_shortPath, m_shortPath.Capacity);

                    String arguments = String.Format("{0} {1} {2} {3} {4}", m_serverName, m_databaseName, m_instanceName, m_instance, m_shortPath.ToString());

                    BatchProgressForm dbFrm = new BatchProgressForm(m_dbScriptPath, m_sdeSetupFileName, arguments);
                    if (dbFrm.ShowDialog() == DialogResult.OK)
                    {
                        finished = true;
                    }
                }
            }
            catch (Exception exc)
            {
                InstallUtility.ExceptionHandler(exc, System.Reflection.MethodInfo.GetCurrentMethod().Name);
            }
            return(finished);
        }
示例#2
0
        private Boolean CreateSQLDatabase()
        {
            Boolean finished = false;

            try
            {
                StringBuilder m_shortPath = new StringBuilder(1000);
                InstallUtility.GetShortPathName(m_dbLocation, m_shortPath, m_shortPath.Capacity);

                StringBuilder m_shortBackupPath = new StringBuilder(1000);
                InstallUtility.GetShortPathName(m_backupLocation, m_shortBackupPath, m_shortBackupPath.Capacity);

                String arguments;
                String typeStr = (m_type == NavServerType.Central) ? "CNS" : "BNS";

                if (rdoUseSQLServerAuthentication.Checked)
                {
                    arguments = String.Format("{0} {1} SQL {2} {3} {4} {5} {6}", m_serverName, m_databaseName, typeStr, m_shortPath.ToString(), m_shortBackupPath.ToString(), m_userName, m_password);
                }
                else
                {
                    arguments = String.Format("{0} {1} WIN {2} {3} {4}", m_serverName, m_databaseName, typeStr, m_shortPath.ToString(), m_shortBackupPath.ToString());
                }
                BatchProgressForm dbFrm = new BatchProgressForm(m_dbScriptPath, m_dbSetupFileName, arguments);
                if (dbFrm.ShowDialog() == DialogResult.OK)
                {
                    finished = true;
                }
            }
            catch (Exception exc)
            {
                InstallUtility.ExceptionHandler(exc, System.Reflection.MethodInfo.GetCurrentMethod().Name);
            }
            return(finished);
        }
        private Boolean CreateSQLDatabase()
        {
            Boolean finished = false;
            try
            {
                StringBuilder m_shortPath = new StringBuilder(1000);
                InstallUtility.GetShortPathName(m_dbLocation, m_shortPath, m_shortPath.Capacity);

                StringBuilder m_shortBackupPath = new StringBuilder(1000);
                InstallUtility.GetShortPathName(m_backupLocation, m_shortBackupPath, m_shortBackupPath.Capacity);

                String arguments;
                String typeStr = (m_type == NavServerType.Central) ? "CNS" : "BNS";

                if (rdoUseSQLServerAuthentication.Checked)
                {
                    arguments = String.Format("{0} {1} SQL {2} {3} {4} {5} {6}", m_serverName, m_databaseName, typeStr, m_shortPath.ToString(), m_shortBackupPath.ToString(), m_userName, m_password);
                }
                else
                {
                    arguments = String.Format("{0} {1} WIN {2} {3} {4}", m_serverName, m_databaseName, typeStr, m_shortPath.ToString(), m_shortBackupPath.ToString());
                }
                BatchProgressForm dbFrm = new BatchProgressForm(m_dbScriptPath, m_dbSetupFileName, arguments);
                if (dbFrm.ShowDialog() == DialogResult.OK)
                {
                    finished = true;
                }
            }
            catch (Exception exc)
            {
                InstallUtility.ExceptionHandler(exc, System.Reflection.MethodInfo.GetCurrentMethod().Name);
            }
            return finished;
        }
        private Boolean CreateSDEDatabase()
        {
            Boolean finished = false;
            try
            {
                if ((m_type == NavServerType.Base) && (m_sdeSetupFileName != String.Empty))
                {
                    StringBuilder m_shortPath = new StringBuilder(1000);
                    InstallUtility.GetShortPathName(m_ecpLocation, m_shortPath, m_shortPath.Capacity);

                    String arguments = String.Format("{0} {1} {2} {3} {4}", m_serverName, m_databaseName, m_instanceName, m_instance, m_shortPath.ToString());

                    BatchProgressForm dbFrm = new BatchProgressForm(m_dbScriptPath, m_sdeSetupFileName, arguments);
                    if (dbFrm.ShowDialog() == DialogResult.OK)
                    {
                        finished = true;
                    }
                }
            }
            catch (Exception exc)
            {
                InstallUtility.ExceptionHandler(exc, System.Reflection.MethodInfo.GetCurrentMethod().Name);
            }
            return finished;
        }