I want my app.config (or my web.config for that matter) to read from an SQL database instead of an XML file. How can I do that?
Your application will need to know how to connect to the database, so your config file will, at least, need a relevant connection string. However, once you have that in place, you can use ADO.NET to connect to the database and select whatever further config you desire.
You can't. The .NET configuration system is only file based. Anyway, how would your program know how to connect to the database ? Of course, you can put some settings in the database, but you program will still need a config file to get the DB connection string (unless you hard-code it, which is of course not recommended)
Three words: why, oh why?
App config files are there for a reason. Introducing a database as a dependency for settings required for the app to even run, is not a good idea - if it even could be done.
I can't see any way you can. You can easily replace the concept of app.config settings with fields stored in a custom database - you just need to write your own configuration class that reads the values from the DB and then makes them accessible as static properties or as Dictionary or similar.
However, web.config is different - asp.net expects to read it's configuration values from a file called web.config. If you really, really want to store values meant for web.config in a database then the best you could do was write an app that would generate the XML file and write it out. But I would really question why on earth you would want to?