If you read my previous post on Connecting a Form to a Database, you might’ve realized that the result was a single live data connection to the entire set of records in a database.This is great if you want to iterate through all records one at a time and update them on an individual basis.

selecting from and updating the same table oracle-68

Also, add the Data Connection Controls object from the Connecting a Form to a Database sample to this subform (making the proper adjustments for the data connection name in each button’s Click event script) and make this subform invisible.

At this point, you should have a form which displays a list of categories and contains an invisible subform.

As a personal go-to guide, it pays attention to issues which I have come across, and contains summarized information which I find useful.

Oracle is huge and the possible tuning and diagnostic approaches are overwhelming; a quick look at Oracle’s Tuning Guide will demonstrate this.

First, get the category selected by the user and determine it’s associated ID: Opening the data connection will cause the explicit bindings you set earlier on the fields in the movie Data subform pertaining to the movie title and show time data to be used in order to load data from the xfa.record.

Movies In Cat record (which will now contain the data from the first record of the Movies In Cat data connection as per the statement we just built using the selected category ID).

The idea with this sample (based on the Movie Database) is to design a form which has a drop down list for picking a movie category and then a subform (which appears only once a category has been selected) that contains the movie data for all movies with the selected category.

The key to achieving this functionality is to use two data connections.

Every now and then, someone posts a comment with a question on how to do something and the answer requires more than just a quick response.

In this case, it was Ricardo’s question on how to select a specific record from a data connection to a database for editing in a form.

Oracle 10g uses something called the CBO (Cost-Based Optimizer) which determines the most efficient way to execute a SQL statement after considering many factors related to the objects referenced and the conditions specified in the query.