User:Drew/BaseRegTest001

HSQLdb embedded

File>New>Database

Ensure option "Create a new database file" is selected.

Next

Ensure the options: "Yes, register the databse" "Create table using the datbase wizard" are selected.

Finished

Save dialog box should be displayed.

Enter "Libo-emb" in name field.

Save

Table Wizard dialog box should be displayed.

Ensure Category selected is "Business"

Ensure sample tables dropdown is "Assets"

Click on ">>", select all fields, button.

Available fields list box should be empty. Selected fields list box should list all field names.

Next

Ensure Selected Fields list box shows field name "AssetID" highlighted.

Change the control AutoValue to "Yes"

Ensure that the Entry Required control is now replaced with the control "Auto-increment statement"

Leave the Auto-Increment Statement field empty.

Next

Ensure the "Create primary key" control is ticked.

Select "Use existing field as a primary key"

In the Fieldname dropdown list choose "AssetID"

The control Auto-Value, to the right of the FieldNames list should be ticked.

Next

Select "Creae form based on this table".

Finish

The Form Wizard dialog should be displayed.

Ensure the "Table or queries" control shows "Table:Assets"

Click on ">>", select all fields, button.

Available fields list box should be empty. Selected fields list box should list all field names.

Click Finish

The top level base document should be displayed.

The Tables section should be displayed.

One table "Assets" should be listed.

Change to the "Forms" section of the Base document window.

One form "Assets" should be listed.

Save the current file.

Open the LibreOffices Options dialog.

Select section LibreOffice Base>Databases

Ensure that "Libo-emb" is listed as a "Registered Database"

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

Foreign Keys

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

From to the "Tables" section of the Base document window.

Select "Use Wizard to create table"

Table Wizard dialog box should be displayed.

Ensure Category selected is "Business"

Ensure sample tables dropdown is "Categories"

Click on ">>", select all fields, button.

Available fields list box should be empty. Selected fields list box should list all field names.

Next

Ensure the "Create primary key" control is ticked.

Select "Use existing field as a primary key"

In the Fieldname dropdown list choose "CategoryID"

Change the control AutoValue to "Yes"

The control Auto-Value, to the right of the FieldNames list should be ticked.

Next

Ensure the "Create primary key" control is ticked.

Select "Use existing field as a primary key"

In the Fieldname dropdown list choose "CategoryID"

The control Auto-Value, to the right of the FieldNames list should be ticked.

Next

Ensure "Insert data immediately" is slected.

Finish

In the table Data View window enter the values: CategoryID, 0 CategoryName, "Paper Clips"

Cursor down once.

Close the Data view window.

Select menu item Tools>Relationships

Relaton Design Window should be open.

Add Tables dialog should be open.

Select "Assets" click Add Select "Categories" click Add

Close Add Tables dialog

Table items for Assets and Categories should be displayed in Relation Window.

Using your mouse cursor: Select AssetCategoryID in the Assets table list. Holing left mouse button down drag to CategoryID item in Categories table lsit. Drop by releasing mouse button

A line should now connect the two fields in the Relation Window display. The left hand side of the line should display the letter 'n' just above it. The right hand side of the line should display the number '1' just above it.

Save the Relations Window contents - click on save as icon.

Close the Relation Window window.

Select the Assets Table

Right click on Assets and select edit.

The Table design editor dialog should be open.

Click on the "Index design" tool button.

The Indexes dialog box should be open.

Ensure that there are now 2 indexes on the table.

Select the second index in the display list.

Ensure that the Index Field is "AssetCategoryID", and Sort order is "Ascending"

Close dialog boxes.

Select the Categories table.

Right mouse click on Categories and select "Form Wizard".

The Form Wizard dialog should be displayed.

Ensure the "Table or queries" control shows "Table:Categories"

Click on ">>", select all fields, button.

Available fields list box should be empty. Selected fields list box should list all field names.

Next

Add a tick mark to the control "Add subform"

Select the radio button "Subform based on exisiting relation"

Select the table "Assets" from list box "Which realation do you want to add?"

Next

Click on ">>", select all fields, button.

Available fields list box should be empty. Selected fields list box should list all field names.

Next

For "Arrangement of main form" select "Columnar - Labels on top" - second button from left.

Finish

The form "Categories" should be open and ready for data input.

The main form: CategoryID should display the value, 0. CategoryName should display the string, Paper Clips

The sub form: AssetID should display the string,  AssetCategoryID should display the value, 0. All other fields should be empty.

In the field "BarcodeNumber" enter the string, 1001

Cursor down.

The sub form: First Row AssetID should display the value, 0. AssetCategoryID should display the value, 0. BarcodeNumber should display the string, 1001.

Second Row AssetID should display the string,  AssetCategoryID should display the value, 0. All other fields should be empty.

Close form.

Save current database.