Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Jeffrey Cheong](https://secure.gravatar.com/avatar/4ba44ac640766418dbf929918fa41834?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Jeffrey Cheong
5,653 Pointsthe preview does not register the error for dataaaabase.db still reads as an object
no matter what I type in PDO object brackets for the database file name it still returns as 'object(PDO)#1 (0) { }'. Im not sure if I made a mistake in sqlite however it did display the following after inserting the sqlite command to the console:
/home/treehouse/workspace/.database.db
the PHP code for the PDO object is:
$db = new PDO('sqlite:./dataaaaaabase.db'); //3
which still seems to output the correct var_dump. Can't figure out the problem.
1 Answer
![Sergio Alen](https://uploads.teamtreehouse.com/production/profile-photos/367132/micro_profile-pic.jpg)
Sergio Alen
26,726 PointsI think it's a problem with workspace, if you read the teacher's notes, it says to write the following instead:
$db = new PDO('sqlite:/database.db');
basically just removing the dot before the forward slash to trigger error
![Jeffrey Cheong](https://secure.gravatar.com/avatar/4ba44ac640766418dbf929918fa41834?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Jeffrey Cheong
5,653 PointsThanks, that seems to work in catching the error and it doesn't create random db files anymore, however now it only registers errors. Nothing else changed other than the period after the colon.
Jeffrey Cheong
5,653 PointsJeffrey Cheong
5,653 PointsOn top of not reading it as an error, When i refresh the workspace it just creates a new database with the name of the database that follows the 'sqlite:.' snippet of code in the PDO object.