Using SQLJ to Perform DML Operations in JavaStop

The application SqljDML (see Listing 7.2) demonstrates how to perform DML operations such as SELECT, INSERT, UPDATE, and DELETE in JavaStop using a JDBC-thin driver and SQLJ. It should be noted that if you intend to use the JDBC-OCI driver, the code is the same except for the database URL syntax.

The application features are as follows:

  • After the application is launched, it shows the connection status and any errors.

  • When the user clicks the CLOSE button, the application closes the connection and exits.

  • When the user clicks the SELECT button, it retrieves all the records from the customers table unless a specified customer ID is specified, in which case it will retrieve only that record.

  • When the ...

Get e-Commerce Applications Using Oracle8i and Java from Scratch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.