Create a Relational Record List as a Page Data Object
- Switch to the Web Perspective
- Go to...
JSP page | Page Data View (right-click) | New | Relational Record List- In Relational Record List wizard, type emp in the Name field, and click Next.
- In the Record List Properties dialog, click New to create a new connection.
- Type emp_con in the Name field, and click Next.
- In the New Connection dialog, type Sample in the Database field.
- In the Select A Database dialog, select Use Live Connect, and click Create new DB Connection.
- In the Establish a connection to a database dialog, select Choose a DB2 alias, click Next.
- In the Specify connection parameters dialog, change the JDBC driver to IBM DB2 Application and Alias to SAMPLE, and click Finish.
- In the Record List Properties dialog, select EMPLOYEE table, and click Next.
- In the Column selection and other tasks dialog, select EMPNO as the primary key, using the Modify primary key task, click Finish. emp (EMPLOYEE) will appear on the Page Data view
Note: When you define the primary key in the Record List Properties dialog, correctly specify the primary key. If your primary key is not unique or incorrect, you will receive unpredictable results. You must specify a primary key in the Record List Properties dialog when it is not defined in the database.