DB::Connect problem in PEAR (DB)

From: Martin Milan (I8sp_at_m.i.do)
Date: 02/26/05


Date: Sat, 26 Feb 2005 21:01:43 GMT

Anyone done any work with sqlite in PEAR?

I'm getting a "No database selected" error when I try the following
code. There is a valid database on the path, so I imagine this is me not
passing something that I should be using...

My thanks in anticipation...

Martin Milan (VB 6 programmer who has decided to grow up and face the
facts...)

<?php
        
        require_once 'DB.php';
        $dsn = array(
    'phptype' => 'sqlite',
    'database' => 'd:/webroot/tickets/Database/db.db',
    );

        $db =& DB::connect($dsn);
        if (DB::isError($db)) {
           die($db->getMessage());
        }

?>