Hi Simon - I don't know how to access the database created by my php program, but I did put an echo after the definition of the command used by exec:
$i = 0; while ($i <= 5) { $valuesSeparatedByCommas = preg_replace('/\t/', ',', $data2[$i]); $sqlcmd = 'INSERT INTO tab (i0,i1,i2,i3,i4,t0,ID0,t1,t2,t3,t4,s,l,date,d) VALUES ('.$valuesSeparatedByCommas.')'; echo $sqlcmd."<br>"; $dbHandle->exec($sqlcmd); $i++; } The output look good. I followed this by try { $sth = $dbHandle->prepare("select * from tab where i0=2"); } catch (PDOException $PDOError) { echo "Syntax Error: ".$PDOError->getMessage(); } and I obtained no messages. I then removed those statements and replaced them by: try { $sth = $dbHandle->query("select * from tab where i0=2"); } catch (PDOException $PDOError) { echo "Syntax Error from query: ".$PDOError->getMessage(); } try { $resultInArray = $sth->fetchAll(); } catch (PDOException $PDOError) { echo "Syntax Error from fetchAll: ".$PDOError->getMessage(); } echo "returned: ".print_r($result,true); and I obtained the following error on the fetchAll() line: Fatal error: Call to a member function fetchAll() on a non-object in … Frank -- View this message in context: http://old.nabble.com/Sqlite-and-php-tp26754013p26768088.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users