Database Forms
OpenOffice.org 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. OpenOffice.org 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 OpenOffice.org 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 OpenOffice.org)
- 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 com.sun.star.sdb.CommandType enumeration)
The com.sun.star.sdb.CommandType enumeration covers the following values:
- TABLE
- Table
- QUERY
- Query
- COMMAND
- SQL command
The database fields are assigned to the individual control elements through this property:
- DataField (String)
- name of linked database field
Tables
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). |