21.08.2013 Views

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Database Forms 241<br />

Database Forms<br />

<strong>OpenOffice</strong>.<strong>org</strong> forms can be directly linked to a database. The forms created in this way<br />

provide all the functions of a full database front end without requiring independent<br />

programming work.<br />

You can page through and search in the selected tables and queries, as well as change data<br />

records and insert new data records. <strong>OpenOffice</strong>.<strong>org</strong> automatically ensures that the<br />

relevant data is retrieved from the database, and that any changes made are written back<br />

to the database.<br />

A database form corresponds to a standard <strong>OpenOffice</strong>.<strong>org</strong> form. In addition to the<br />

standard properties, the following database-specific properties must also be set in the form:<br />

DataSourceName (String)<br />

name of data source (refer to → Database Access; the data source must be globally<br />

created in <strong>OpenOffice</strong>.<strong>org</strong>)<br />

Command (String)<br />

name of table, query, or the SQL select command to which a link is to be made<br />

CommandType (Const)<br />

The<br />

specifies whether the Command is a table, a query or a SQL command (value from<br />

com.sun.star.sdb.CommandType<br />

enumeration)<br />

com.sun.star.sdb.CommandType<br />

enumeration covers the following values:<br />

TABLE<br />

Table<br />

QUERY<br />

Query<br />

COMMAND<br />

SQL command<br />

The database fields are assigned to the individual control elements through this property:<br />

DataField (String)<br />

name of linked database field

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!