Welcome Guest, Not a member yet? Register   Sign In
code igniter and ms access
#2

[eluser]Unknown[/eluser]
Ok, I figured out that it should be something like:

Code:
$db['default']['hostname'] = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:/path/to/db.mdb";
$db['default']['username'] = "ADODB.Connection";
$db['default']['password'] = "";
$db['default']['database'] = "C:/path/to/db.mdb";
$db['default']['dbdriver'] = "odbc";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

However, I seem to have run into some bugs in the system. I can tell that it's using CI_DB_odbc_driver->db_connect() to connect to the db, which is located in system/database/drivers/odbc/odbc_driver.php. For whatever reason, the $this object in there doesn't seem to have any of the settings from database.php in it, so I have to re-add them there to get it to work. I also have to add $this->db->dbdriver = "odbc"; to my controller right after the $this->load->database(); call.


Messages In This Thread
code igniter and ms access - by El Forum - 10-07-2008, 09:06 AM
code igniter and ms access - by El Forum - 10-07-2008, 11:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB