Database Update

For database update heitml supports the dbform component. A dbform displays a form for a given database relation. Using the form, it is possible to enter new records, to search for existing records, and modify or delete existing records.

Applications

In order to simplify searches and maintenance, or to present the same data in different contexts, it is often a good idea to store information as part of a database than directly on a Web page. In such cases the owner of the Web site must have a way to edit the database content.

Tip 1: A dbform can be put on a protected page, thus providing all the necessary functionality.

The public Web site should then contain components to display the database content in various formats.

Another common application is a feedback or guestbook database where anyone can leave a message. In this case a dbform without modify and delete functions can be used. If the feedback shouldn't be public, search functions should also be disabled. In this case another dbform can be used on a protected page for display and maintenance of the database.

Together with SSL and password protection, it is also possible to create a kind of registration database where everyone can make entries and change them to keep them up to date (e.g. a database of cooperation partners).

Usage

The tryout pages contain step by step instructions on how to put a dbform on a page. Initially, the form shows up with several buttons, but without any fields. Then you can select it in the RADpage window and click on fields. This will give you a chance to select the fields for inclusion into the form.

Form Functionality

Initially, an empty form is displayed. Then data can be entered and written to the database by pressing the Modify button. Alternatively, some part of the record can be entered. Then, pressing the Search button looks for a matching record in the database. The record is then displayed. It can be changed by entering new data and pressing Modify, or it can be deleted by pressing Delete.

Note: By default, the form contains dbformbutton components. You can delete some buttons if you want to disable certain functions.

Layout

By default, the form contains a table for layout. You can keep that or create a completely different layout.

Tip 2: Inside the form you can place field components that display database fields. By editing the properties of the field components, you can specify the field layout as well as some checks. In fact, heitml features many different field components that can be used here.

Keys

For internal processing, the primary key of the database relation is needed. With most databases, RADpage automatically finds and sets the key property correctly. You can change this value if necessary, just enter the names of all key fields separated by commas.

Tip 3: Using the keychange property you can disable changes of the key of a database record.

Reference

Component:dbformDetails
A database record form edits a single record from a database relation. Usually the form starts up empty and it does not have a current row. Then a new record can be inserted or an existing record can be searched for by entering some values. After a successful search the row found becomes the current row. It can then be modified or deleted.
Property Kind Description
OidId  
RelationRelation Name Database relation. 
KeyString Key field names, separated by comma. If you leave this empty, the Component Editor tries to determine it from the relation. 
KeychangeString(60) Key field change model.
Value "update" allows updating key fields.
Value "copy" is like "update", but the modify button copies the record if key fields were changed.
Value "none" disallows changing key fields.  
StateString(60) Use to disable form fields. 
MethodString(60) HTTP method to submit the form data set.
Value "post" should be used when form processing causes side effects, e.g. modifies a database, and if the form contains fieldfileupload.  
EnctypeString(60) Content type for method "post". Use "multipart/form-data" with fieldfileupload.  
SuccessuriString(60) Continue with this URI after the form has been submitted successfully.  
FragmentString(10) Section name (The # part of the action URI without the #). No effect on successuri. 
PasswordfieldString(20)  for password protection: password field name  
MsgallowedString(60) Accepted messages. The enabled functions can be activated from the browser. 

Component:dbformbuttonDetails
Database form button used to trigger one of several actions of a dbform. It must be used on a dbform.
The value is used to render the button depending on the button layout. Name must be a unique name for the button inside the form.
Property Kind Description
NameString(10) Button name. 
ValueString(10) Button Label. 
LayoutString(60) Input is a standard HTML submit button, image shows an image on the button, link creates a link (needs JavaScript), compatlink a link or button depending on the browser, button an HTML4.0 button (must occur just once at end of form), mbutton an HTML 4.0 button (needs JavaScript), and compatbutton an HTML 4.0 button or normal button depending on the browser; more  
TypeString(60) Select the button's action.  
SrcString(20)  Image Url, only used for layout=image  
BorderInteger Border Size, only used for layout=image  
StateString(60) Is button visible and enabled ? 

See Fields for field components to place inside a dbform.


This page was dynamically generated by the web application development tool RADpage of H.E.I. H.E.I. provides support, tools, and services like Web development tools, compilers, interpreters, AJAX design, Webdesign in Mannheimm, and Web programming, and
© 1996-2017 H.E.I. All Rights Reserved.



Homepage
Intro/Features
Component Guide
  Application
    Counters
    Mailform
    Outline
    Database Display
    Database Search
    Record Display
    Database Update
    Shopping
  Generic
  Programmable
Programming
User Guide
FAQ
Mailinglist
Discussion Group
Services
Pricing/Register
Download
Frame
 
Contact
 
 
 
Search: