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 trialAlastair Herd
2,306 PointsI don't see how it's connected?
Following on from the code we wrote in the Workspace, I don't see how that solution applies to this part of the question.
Question: Using Connection c, insert exactly one row into the languages table. The new row's id column should have a value of 2, and its name column should have a value of 'Java'.
If anyone would be able to explain to me how this is done and how that relates the the past video that would be amazing!
Thank you very much for all your help! Alastair
// Load class "org.sqlite.JDBC"
Class.forName("org.sqlite.JDBC");
// Establish connection to database named "treehouse.db"
try(Connection c = DriverManager.getConnection("jdbc:sqlite:treehouse.db")) {
} catch(SQLException ex) {
}