Database Forms

From Apache OpenOffice Wiki
Jump to: navigation, search

Apache OpenOffice forms can be directly linked to a database. The forms created in this way provide all the functions of a full database front end without requiring independent programming work.

You can page through and search in the selected tables and queries, as well as change data records and insert new data records. Apache OpenOffice automatically ensures that the relevant data is retrieved from the database, and that any changes made are written back to the database.

A database form corresponds to a standard Apache OpenOffice form. In addition to the standard properties, the following database-specific properties must also be set in the form:

DataSourceName (String)
name of data source (refer to Database Access; the data source must be globally created in Apache OpenOffice)
Command (String)
name of table, query, or the SQL select command to which a link is to be made
CommandType (Const)
specifies whether the Command is a table, a query or a SQL command (value from enumeration)

The enumeration covers the following values:

SQL command

The database fields are assigned to the individual control elements through this property:

DataField (String)
name of linked database field


Another control element is provided for work with databases, the table control element. This represents the content of a complete database table or query. In the simplest scenario, a table control element is linked to a database using the autopilot form, which links all columns with the relevant database fields in accordance with the user specifications.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools