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

Python Using Databases in Python Our Diary App Doing Data Entry

How to enter into database using the sqlite command on Windows

How do i access the sqlite to check for entries like on the video. Im using Python IDE on windows

3 Answers

I am not sure what python IDE your using but you can access the python shell on windows by typing python into the command prompt.

Once in the shell type

1) sqlite3 'database name'
2) .tables will list all the tables in the database.

Ensure that sqlite3 is installed on your machine.

Do I have to install it separately, I thought it comes bundled with Python installation. Im using Python 3.4.3 and the code for creating the db including tables is running and I can see the created db in the folder on windows explorer

It doesn't come installed with python you need to install it separately. I use a linux machine so its pretty straight forward with a apt-get install sqlite3 but for windows you can try this link.

http://www.codeproject.com/Articles/850834/Installing-and-Using-SQLite-on-Windows

Even though the ORM creates the DB you need a tool to view it, its similar to access db in many ways where you can have the .db file but cant do anything with it without the MS ACCESS.

hope that helps