[eluser]bretticus[/eluser]
Covering all bases here, in case you meant that you want to connect to a database without writing a configuration file, you do not have to auto-connect to the database or use a configuration file at all. You can pass an array as you load the database class manually.
Here's the example from the manual:
Code:
$config['hostname'] = "localhost";
$config['username'] = "myusername";
$config['password'] = "mypassword";
$config['database'] = "mydatabase";
$config['dbdriver'] = "mysql";
$config['dbprefix'] = "";
$config['pconnect'] = FALSE;
$config['db_debug'] = TRUE;
$config['cache_on'] = FALSE;
$config['cachedir'] = "";
$config['char_set'] = "utf8";
$config['dbcollat'] = "utf8_general_ci";
$this->load->database($config);
Your array values can be set dynamically of course (be careful!)