When the solution matters

Tips...

Registration Documentation Knowledgebase Seminars / Training Technical Support Partner Central

4D v11 SQL - How Do I?

New:  XML | Images

Enhanced: Forms | Web  | Images | Interfaces

 

XML Download

Discover a set of tools to generate XML within your developments through two different ways (DOM, SAX).

Export XML DOM

One of the approaches to produce an XML structure is to write directly the structure sequentially in a disc file.
This database example shows another approach. The idea is to generate a DOM tree in memory (DOM export).
Two examples are provided. In the first of them, records are written in a DOM tree created for the purpose. In the second example, a model is used (an empty structure).

Import SAX

There are two approaches in 4D to read an XML structure. A DOM tree can be generated in memory or analyze structure sequentially from a disc file. This demonstration shows this last approach, a SAX import.

Export XML SAX

This is a different approach than the DOM export to produce a XML structure. Here the structure is written directly and sequentially in a disc file.
This database example shows the approach called “SAX”.

Chercher par xPath

This database example shows how to use DOM Find XML element command to read again easily a value from an XML tree.

An object method shows how the XML doc is stored in memory in, a DOM tree. Then, the form method illustrates how to delete this tree from memory. Finally, objects methods of some buttons show XPath notation to access to a value of the memory.

XML_Validation

One of the innovating contribution of the XML formalism is to let validating an XML structure compared with a predefined template. Several standards exist to define these templates. 4D v11 SQL lets validating DTD and XML schemas of the W3C.

Images Download

Combiner image

This database shows how to combine two pictures. Pictures can be of different types (ex : jpg, gif, png, …).
Position of the picture can be configurated thanks to the COMBINE PICTURE language command. Three types of combinations can be accessed via the constants of the “Picture Transformation” theme: Horizontal concatenation, Vertical concatenation, superimposition.

Transformer image

This database shows how to resize a picture. The original picture can be of any type (ex : jpg, gif, png, …).
Resizing can be defined by four parameters: X and Y origins, width and height as expected. TRANSFORM PICTURE language command is used in this example.
Many operation can be carried out via the followings operators: Reset, Scale, Translate, Flip horizontally or vertically, Crop, Fade to grey scale.


Forms Download

Choix formulaire

This database example shows how to choose an intput form depending on the data or the User action.

Formulaire multi-pages

Forms can contain several pages. The advantage is to be able to organize several objects on a form.

Numero Ligne Affichée

This database example shows how to use “Displayed line number” command to alternate different background colors on the lines of output forms.

Saisie Liste

This database example shows how to use the new syntax of the SET ENTERABLE command, that shows to the developer to authorize or not, on the fly, entry in list.

Marquer enregistrements

This database example shows how to use HIGHLIGHT RECORDS and GET HIGHLIGHTED RECORDS with a set of records.

Formulaires hérités

This database example shows how to use inherited forms and the 0 page of the 4D forms.

Web Download

Lancer ou stoppez le Serveur web

This database example shows how to program port number and activate your database on web server.

Sur connexion Web

This database example uses the Web Server integrated of 4D. “On Web Connexion” database method, is launched each time that the web server receive a request starting with the “4DCGI” URL or if the request got is invalid.

Interface Download

Boutons 3D

Cet exemple vous explique comment utiliser les boutons 3D.

Cacher ou Afficher la Barre de Menus

This example explains how to use hide or display the Menu Bar.

 

 

International | Company | Contact 4D | Site Map | Privacy Policy | © 4D UK 1995-2008 | Change font size: [A] [A] [A] | Print this page