public static string GetQuery(MainForm.Table state)
        {
            switch (state)
            {
            case MainForm.Table.Import:
            case MainForm.Table.Songs: return(Properties.Resources.allQuery);

            case MainForm.Table.Albums: return("select * from albums");

            case MainForm.Table.Authors: return("select * from authors");
            }
            return(null);
        }
        public static List <string> GetColumnNames(MainForm.Table state)
        {
            SqlCommand command = new SqlCommand(GetQuery(state), Connection);
            // Open the connection in a try/catch block.
            // Create and execute the DataReader, writing the result
            // set to the console window.
            SqlDataReader reader = command.ExecuteReader();
            List <string> output = new List <string>();

            for (int i = 0; i < reader.FieldCount; i++)
            {
                output.Add(reader.GetName(i));
            }
            reader.Close();
            return(output);
        }