Multiple choice

The DBA added a STATE column defined as VARCHAR2(2) to the State table. This column will contain two-letter state abbreviations because the State table is quite large, storing complete state names would waste space in the database. The DBA asks JOHN to add a corresponding State item to the State block of the Geographical Management form. JOHN opened the Layout Editor of the Geographical Management form and created a list item on the canvas in the State block. In the Property Palette for the list item, he changed the Name property to State and the Database Item property to Yes. He then open the Elements in List property and add some state abbreviations and names to the list, as shown in the exhibit. When he ran the form to test it, after selecting a value from the list and clicking Commit, he received an FRM error. Its corresponding database error is the following: ORA-01401: inserted value too large for column What should he do to correct this problem?

  1. Have the DBA increase the column width in the database.

  2. Change the List Style property for the State item to Combo Box.

  3. Change the List Style property for the State item to T-list.

  4. Change the elements in the list of the State item so that the list elements are the state names and the list element values are the state abbreviations.t.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The error occurs because John is storing full state names in the list elements, but the database column is VARCHAR2(2) expecting only abbreviations. The solution is to use state names as display labels (what users see) while mapping them to 2-character abbreviations as actual values stored in the database.