[eluser]George Tavas[/eluser]
A few days ago i was trying to connect into MS Access database with no luck.
So I figured out that the ODBC driver has some difficulties connecting into an MS Access db.
So I used the easiest workaround that i probably could think ath the time.
I used odbc_connect() to connect at the mdb driver and then i manually set the established connection as the active record driver property $conn_id.
Example
Code:
//Just make a false connection with db_debug unset or false just to initialize the
//ODBC_Driver object
$dsn = 'odbc://127.0.0.1/database?&char_set=utf8&dbcollat=utf8_general_ci&port=8888';
$access = $this->load->database($dsn, true);
//Then create dsn connection.
$dsn = "Driver={Microsoft Access Driver (*.mdb)};DefaultDir=C:/path/to/datbdase/folder;Dbq=your_db.mdb";
//Establish the connection
$con = odbc_connect($dsn,"username","password");
//Set connection as the conn_id property in the ODBC_Driver
$access->conn_id = $con;
//Set db_debug to TRUE to be able see any errors on your queries
$access->db_debug = true;
//You are ready to work with active record
$res = $access->get("MyTable");
print_r($res->result());