Difference between revisions of "Documentation/BASIC Guide/Database Forms"

From Apache OpenOffice Wiki
Jump to: navigation, search
 
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Documentation/BASICGuideTOC/v2
 
{{Documentation/BASICGuideTOC/v2
|ShowPrevNext=none
+
|ShowPrevNext=block
 
|ShowPrevPage=block
 
|ShowPrevPage=block
 +
|ShowNextPage=none
 
|PrevPage=Documentation/BASIC Guide/Control Element Forms
 
|PrevPage=Documentation/BASIC Guide/Control Element Forms
 
|form=block
 
|form=block
}}<!-- {{DISPLAYTITLE:Database Forms}} -->
+
}}
 +
{{DISPLAYTITLE:Database Forms}}
 +
 +
{{AOo}} 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.
  
= Database Forms =
+
You can page through and search in the selected tables and queries, as well as change data records and insert new data records. {{AOo}} automatically ensures that the relevant data is retrieved from the database, and that any changes made are written back to the database.
  
{{OOo}} 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.
+
A database form corresponds to a standard {{AOo}} form. In addition to the standard properties, the following database-specific properties must also be set in the form:
  
The user has the option of paging through and searching the selected tables and queries, as well as changing data records and inserting new data records. {{OOo}} automatically ensures that the relevant data is retrieved from the database, and that any changes made are written back to the database.
+
;<tt>DataSourceName (String)</tt>:name of data source (refer to [[Documentation/BASIC Guide/Database Access|Database Access]]; the data source must be globally created in {{AOo}})
 +
;<tt>Command (String)</tt>:name of table, query, or the SQL select command to which a link is to be made
 +
;<tt>CommandType (Const)</tt>:specifies whether the Command is a table, a query or a SQL command (value from <idl>com.sun.star.sdb.CommandType</idl> enumeration)
  
A database form basically corresponds to a standard {{OOo}} form. In addition to the standard properties, the following database-specific properties must also be set in the form:
+
The <idl>com.sun.star.sdb.CommandType</idl> enumeration covers the following values:
 
+
;<tt>DataSourceName (String)</tt>:name of data source (refer to [[Documentation/BASIC Guide/Database Access|Database Access]] ; the data source must be globally created in {{OOo}}).
+
;<tt>Command (String)</tt>:name of table, query, or the SQL select command to which a link is to be made.
+
;<tt>CommandType (Const)</tt>:specifies whether the Command is a table, a query or a SQL command (value from <tt>com.sun.star.sdb.CommandType</tt> enumeration).
+
 
+
The <tt>com.sun.star.sdb.CommandType</tt> enumeration covers the following values:
+
  
 
;<tt>TABLE</tt>:Table
 
;<tt>TABLE</tt>:Table
Line 26: Line 26:
 
The database fields are assigned to the individual control elements through this property:
 
The database fields are assigned to the individual control elements through this property:
  
;<tt>DataField (String)</tt>:name of linked database field.
+
;<tt>DataField (String)</tt>:name of linked database field
  
 
== Tables ==
 
== 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. Because the associated API is relatively complex, we shall not provide a complete description of the API at this point.
+
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.
 
+
  
 +
{{InterWiki Languages BasicGuide|articletitle=Documentation/BASIC Guide/Database Forms}}
 
{{PDL1}}
 
{{PDL1}}

Latest revision as of 15:48, 27 January 2021


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 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).
Personal tools