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

[eluser]Unknown[/eluser]
I'm trying to use Microsoft Access as the db for a demo project that I'm thinking of doing in Code Igniter. Ignoring the possible folly of using MS Access, I haven't been able to figure out precisely how the connection string corresponds to the framework's db settings. In straight php, I can use this code to connect to an access db:

Code:
$db_connection = odbc_connect(
  "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\\path\\to\\db.mdb",
  "ADODB.Connection", "", "SQL_CUR_USE_ODBC"
);

How do those strings correspond to the Code Igniter db settings? This doesn't seem to be quite working (though it's not exactly throwing an error, either):

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

Oh, BTW, I'm running a xampp install of apache under xp if that matters.


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