I’m trying to connect to a sqlite3 database using ADOdb. Using:
- pdo_sqlite: works
- sqlite3:
Fatal error: Uncaught exception ‘Exception’ with message ‘Unable to open database: unable to open database file’
-
sqlite:
Could not connect to database
$driver = "pdo_sqlite";
$db = NewADOConnection("$driver://".urlencode(dirname(__FILE__)."/test.db3"));
if (!$db) {
die("Could not connect to database");
}
edit
I also asked the question on adodb’s forums: http://phplens.com/lens/lensforum/msgs.php?id=19236
I edited
drivers/adodb-sqlite3.inc.php. Function _connect()seems to work with my little test (active record: new item, save, reload it, delete).