Created
January 8, 2014 22:45
-
-
Save wspeirs/8325985 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QueryRunner runner = new QueryRunner(dataSource); | |
try | |
{ | |
// Execute the SQL insert statement | |
runner.insert("INSERT INTO Person (name,height) VALUES (:name,:height)") | |
.bind("name", "John Doe") | |
.bind("height", 1.82) | |
.execute(); | |
// Now it's time to rise to the occation... | |
int updates = runner.update("UPDATE Person SET height=:height WHERE name=:name") | |
.bind("name", "John Doe") | |
.bind("height", 2.05) | |
.execute(); | |
} | |
catch(SQLException sqle) { | |
// Handle it | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment