e"));
book.setBookClass(rs.getInt("bookclass"));
book.setClassname(rs.getString("classname"));
book.setAuthor(rs.getString("author"));
book.setPublish(rs.getString("publish"));
book.setBookNo(rs.getString("Bookno"));
book.setContent(rs.getString("content"));
book.setPrince(rs.getFloat("prince"));
book.setAmount(rs.getInt("amount"));
book.setLeav_number(rs.getInt("leav_number"));
book.setRegTime(rs.getString("regtime"));
booklist.addElement(book);
}
rs.close();
return true;
}
catch (SQLException e)
{
System.out.println(e);
return false;
}
}
public boolean insert() throws Exception {
sqlStr = "insert into my_book (Bookname,Bookclass,Author,Publish,Bookno,Content,Prince,Amount,Leav_number,Regtime) values ('";
sqlStr = sqlStr + strFormat.toSql(abooks.getBookName()) + "','";
sqlStr = sqlStr + abooks.getBookClass() + "','";
sqlStr = sqlStr + strFormat.toSql(abooks.getAuthor()) + "','";
sqlStr = sqlStr + strFormat.toSql(
上一篇:
BookService.java
下一篇:
西班牙语童话:El Alimento de Dios