diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-07-15 14:06:57 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-07-15 14:06:57 +0200 |
commit | f00fd63cd8a4252d85f04359956d5f79036f0eb2 (patch) | |
tree | 7561272fd22e7d1cc844c4f636bd68c5d2527083 /src/com/joshwalters/bookcatalog/bookdatabase/BookDatabase.java | |
parent | 8b12426328b9200acca352dba11263d0f51a3ba7 (diff) | |
download | BookCatalog-working.tar.gz BookCatalog-working.tar.xz |
Add field for defaul note when adding new booksworking
This allows the user to use the note feature to track in which shelf a
book is located without having to manually add the information to each
newly added book.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'src/com/joshwalters/bookcatalog/bookdatabase/BookDatabase.java')
-rw-r--r-- | src/com/joshwalters/bookcatalog/bookdatabase/BookDatabase.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/joshwalters/bookcatalog/bookdatabase/BookDatabase.java b/src/com/joshwalters/bookcatalog/bookdatabase/BookDatabase.java index 9f06aba..352adf7 100644 --- a/src/com/joshwalters/bookcatalog/bookdatabase/BookDatabase.java +++ b/src/com/joshwalters/bookcatalog/bookdatabase/BookDatabase.java @@ -211,12 +211,13 @@ public class BookDatabase { * @param Price
* @param Publisher
* @param Subject
+ * @param Notes
* @throws SQLException
* @throws BookAlreadyInDatabase
*/
public void insertBook(String Title, String Author, String Date,
String Description, String ISBN, String Price, String Publisher,
- String Subject) throws SQLException, BookAlreadyInDatabase {
+ String Subject, String Notes) throws SQLException, BookAlreadyInDatabase {
// Check to see if the book is in the database
if (!isBookInDatabase(ISBN)) {
// The SQL statement
@@ -231,8 +232,7 @@ public class BookDatabase { preparedStatement.setString(6, Price);
preparedStatement.setString(7, Publisher);
preparedStatement.setString(8, Subject);
- // Set the notes for the book blank by default.
- preparedStatement.setString(9, "");
+ preparedStatement.setString(9, Notes);
if (preparedStatement.execute()) {
resultSet = statement.getResultSet();
if (resultSet != null) {
|