When the solution matters

Tips...

Registration Documentation Knowledgebase Seminars / Training Technical Support Partner Central

4D v11 SQL Examples

New:  SQL | Picture Managment | Components | Indexes | Drag and Drop | Unicode

Enhanced: Listes | 4D Write  | 4D Mailing  | 4D Objects  | Users managment | Web  | Forms  | User environnement

 

SQL Download

Integrated native SQL language

The major new feature of 4D v11 SQL is its integrated native SQL language

The 4D v11 language allows you to connect directly to an ODBC data source and to execute SQL queries inside Begin SQL/End SQL tags (+ via the new 4D command: QUERY BY SQL).
This database shows how to carry out queries with the 4D language as well as with SQL.
Specific examples show both languages in parallel in order to compare them easily and to highlight their respective advantages.
Comments and explanations are provided during the execution of these queries.
The 1st example illustrates a simple query (which consists of finding the airports of a specific city and country).
A 2nd example illustrates a join (which consists of finding from among a selection of airports, those that can be accessed via a direct flight).
A 3rd example illustrates a complex SQL query written simply using the 4D language. 
A 4th example shows a complex 4D query illustrating “nested” queries in SQL. 

ERP and SQL in 4D

4D ERP Toolbar

This is a set of management databases that make use of the power of SQL in 4D.

4D ERP Product

This product management database also shows the new capabilities of 4D as far as SQL is concerned. This database can be used as a component that can be integrated into a database of your choice.

4D ERP Contact

This database is a contacts management database. You can add and delete contacts, companies, addresses, and media. Companies and contacts can be filtered using the filter area.

4D ERP Invoice

This invoice management database also shows the new capabilities of 4D as far as SQL is concerned. This database can be used as a component that can be integrated into a database of your choice.

 

Flex & SQL

This Flex component allows the use of Adobe Flex to connect to a 4D v11 SQL Server database through SQL queries.

Picture management Download

Discover the integrated SVG

4D v11 SQL has an integrated SVG rendering engine. SVG (Scalable Vector Graphics) is a vector file format (.svg extension).
This example database illustrates the native support of svg pictures (vectorial pictures). It shows the SVG display capacities in 4D through picture variables (example graph created with the SVG engine).

Picture processing

This database shows native format support for pictures of the following types: jpeg, png, svg (vectorial picture), EMF (on PC), PDF (on Mac) but also all the formats that have been previously supported like BMP (on PC), and PICT (on Mac).
New operators allow pictures to be transformed (combining pictures, etc.). Memory optimization has been enhanced in 4D v11 SQL (ref counting). Take advantage of the contextual menu to save any picture you want in the format of your choice.

Components and Tool palette Download

4D Pop

4D Pop is a component that installs a palette in the Design mode. Tools will be added to this palette gradually as compatible components are installed.

4D Pop Bookmark

This tool is a bookmark manager. It lets you quickly access a Web page, an e-mail address, a file or a folder, etc. directly within your development environment.

4D Pop Quiz

This tool is very useful to find a command by keyword, access online documentation by double-clicking, or drag & drop a command right into the Method editor.

4DPop Window

4D Pop Window is a hierarchical and organized window menu that displays the windows from the Design and Application mode. You can organize these windows or recover off-screen windows.

4D Pop Color Chart

Create your own colors and customized color palette. You can use these colors in your object methods via a simple drag and drop.

4D Pop XLIFF

4D v11 SQL simplifies localization of your databases thanks to the integration of the XLIFF standard (localization standard) into 4D.
This database provides you with an editor for editing XLIFF resources.

You can easily manage and edit the xliff files of your database, as well as drag text references directly into the Method editor or Form editor.

Advantages of this tool:

  • a simplified interface with respect to more professional tools
  • its integration into 4D
  • possibility of removing it during deployment (thanks to the new architecture of components).
  • possibility of generating standardized files that you will be able to provide to localizers without further manipulation.

This database integrates tools to minimize the impact of converting STR# and TEXT to the new XLIFF standard.

4D Pop Migration

Tools for a smooth migration to version 4D v11 SQL:

  • Edit keyboard shortcuts in Design mode,
  • Migrate “resource fork” user constants of the structure in a dedicated plugin,
  • Convert macros files
  • Extract cicn, PICT & MASK resources as localized png picture files in the resource folder of your database

Convert STR# & TEXT resources into xliff files.

4D Pop BugReport

Write and post bugs without leaving the Design environment, thus avoiding unnecessary typing and taking full advantage of drag & drop of code while writing the description of your bug.

4D Pop Ruler

Display a ruler and guides to make precise measurements, in Design or Application mode; simulate a screen size and tweak your interfaces.

4D Indexes Download

This example database shows the possibilities of using indexes in 4D v11 SQL:
- new index types:
. BTree index for non-repeated values (IDs, names, etc.)
. Cluster index for repeated values (Booleans, titles (M., Ms., etc.))
. composite index for sorting (FirstName+LastName, City+ZipCode,
State+City, etc.)
. keyword indexes for texts
- indexes created stored in a separate file
- etc.
To demonstrate their efficiency, this example explains how to choose the correct index type.

Extended Drag and Drop Download

4D Rugby

This database shows the possibilities for professionals to manage for example a sports club.
You can then manage your own teams and players, improve their skills, organize competitions, etc. using all the power of 4D with, among other things, the drag & drop feature and hierarchical lists.

Unicode support Download

This database is for informative purposes. It demonstrates the ability of 4D to display Unicode characters.
It also shows the conversion of characters during the use of the Uppercase and Lowercase functions.


Lists Download

Hierarchical list

This database shows the possibilities of using a hierarchical list:
- display of items of the list of colors
- multiple selection allowed
- events used: "On Expand", "On Collapse" and "On Selection Change"
- dynamically built list
- icons from resources, object library or variables

Included list

This database show the possibilities of included lists:
- calculated content updated according to the selections
- v11 customized interface (alignment, font style, etc.)
- graphic object replaces color of current selection
- display of contents of several tables in one form

Listbox

This database shows how to use the list box objects and their various possibilities:
- data entry
- alternate color for each row
- resizing
- sort by columns
- hide columns
- modify text properties (font, size, style, colors)
- show/hide scrollbars
- show/hide column headers
- show/hide vertical and horizontal grid
- modify the column order by drag&drop
- modify the row order by drag&drop
All of the things shown in this example database are done without any programming.

4D Write Download

4D Encyclopedia

This database allows you to consult and edit the contents of a glossary or an interactive dictionary.

An encyclopedia that is entirely dynamic thanks to 4D Write hypertext links.

4D Mailing Download

This database show how to use the "4D Write" word processor to send customized e-mails to contacts as a mail shot.

4D Objects Download

This example database shows all the interface objects managed by 4D:
- variables
- buttons
- field lists
- checkboxes
- etc.
To use it, you can click on the buttons representing the Form editor tool bar or you can select a specific type of object directly from a dropdown menu.

User management Download

4D Passwords

This database shows how to manage users by programming.
It allows you to:
- save and restore users and their passwords (encrypted)
- use a customized connection dialog box
- remove or create new users
- create additional information for a user (icon, visibility, etc.)

Web (static, dynamic, FTP transfert) Download

4D StaticWebBuilder

This database shows how to publish a relational database on the Web both statically and dynamically.
It also shows how to transfer via FTP the generated static web site using the 4D Internet Commands plugin. Additional information is provided when running the demo.

Forms Download

4D UserForms

With 4D, users can modify certain forms.
Starting with a classic "clients - invoices - invoices_lines" structure, two forms can be duplicated then modified by the users: "envelopes" and "invoices."
These two templates have been deliberately left "open" so the final user can modify the text, formats and paper orientations, as well as margins, objects, etc.

Each form can be duplicated as many times as necessary. This allows, for example, specifying several envelope formats as well as different templates for the invoices.

User environment Download

4D Reporter

This component provides a way to display and save a general description of a 4D Host database (application, structure and data) as well as the hardware and system environment it is running on.

 

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