Ejemplo n.º 1
0
        private void Create()
        {
            StatusInfo = string.Empty;

            using (var dbHandler = new DatabaseHandler(selectedDatabase.DatabasePath))
            {
                try
                {
                    dbHandler.ExecuteNonQuery(sqlStatement);
                    StatusInfo = LocalisationHelper.GetString("IndexCreator_StatusInfo_Success");
                    MainTreeHandler.AddIndex(indexName, selectedDatabase.DatabasePath);
                }
                catch (Exception ex)
                {
                    logger.Error("An error occured when the user tried to create an index from the IndexCreator.", ex);
                    StatusInfo = ex.Message.Replace("SQL logic error or missing database\r\n", "SQL-Error - ");
                }
            }
        }