On Wed, Dec 01, 2004 at 10:09:55AM -0500, Ricardo SIGNES wrote: > * Tim Bunce <[EMAIL PROTECTED]> [2004-12-01T04:48:40] > > I know what it does, I'm trying to find real examples that demonstrate > > why people think it's needed. Nick has provided a good one. Any others? > > I have a very similar set of uses to Nick's. Our model classes at work > can connect to SQLite, MSSQL (ODBC) or MSSQL (ADO). We store config > data as something like: > > db_driver: ODBC > db_user: kibo > db_pass: grep > db_name: users > > It DTRT with regard to building a DSN string that contains > "databasename=users" or "Initial Catalog=users" or "dbname=users.db" and > so on. > > It's not the hardest problem in the world, but it's more lines to > maintain.
Why not store something like this?: db_user: kibo db_pass: grep db_dsn: dbi:...:... Tim.