Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Overview of this book

Table of Contents (20 chapters)
JDBC 4.0 and Oracle JDeveloper for J2EE Development
Credits
About the Author
About the Reviewer
Preface

Modifying a Database Table with Web RowSet


With ResultSet interface, to modify the data in the database, a JDBC connection with the database is required to insert, delete, or update a database table row. With a Web RowSet, the data may be modified in the OracleWebRowSet object, and a connection is required only to update the database table with the data in the Web RowSet after all the modifications have been made to the Web RowSet. In this section, the data in the Web RowSet is modified and the database table is updated with the modified Web RowSet. A JDBC connection is not required to modify the data in the example Web RowSet. An OracleWebRowSet object is generated as in the previous section.

Create a JSP, ModifyWebRowSet.jsp, to create and modify a Web RowSet from an SQL query. Also add JSPs CreateRow.jsp, ReadRow.jsp, UpdateRow.jsp, DeleteRow.jsp, and UpdateDatabase.jsp, which are listed later in this chapter. ModifyWebRowSet.jsp, the JSP used to create and modify a Web RowSet is listed...