Getting the most out of the
Visual DataFlex 9 Sample Applications

A Data Access Worldwide White Paper
by Dennis Piccioni

August 28, 2002
Last Edited: April 10, 2003

Visual DataFlex 9.0 comes with more up-to-date sample applications than any previous version of Visual DataFlex (VDF). These sample applications demonstrate many useful features and methods that developers want to incorporate into their applications. This paper tells you where in the samples specific features and techniques are used. Some of the techniques described here are new to revision 9.0.

Contents

This paper is divided into 2 main sections, each of which contains mostly the same information, but it is organized in different ways.

  1. How Do I?

This section breaks down the samples by specific features used in the Visual DataFlex Samples and points you to the places in the samples that the feature is demonstrated.

  1. Samples Overview

This section lists each of the Visual DataFlex Samples and explains what features and techniques are demonstrated in that sample.

1. How Do I?

Feature List

Click on the link below to see details on where in the VDF 9.0 samples any particular technique or feature is used.

ActiveX Coding Database Data-Aware Controls & Classes Email & Internet

Menus & Toolbars

Non-Data-Aware Controls & Classes

Reporting

Miscellaneous Topics

Sample Technique Details

This section details the use of specific features and techniques in the VDF samples.

Workspace: Sample Applications > Order
Component: Customer Entry view

where:

Workspace: the workspace name: open in VDF IDE using File > Select Workspace
Component: the component name: open in VDF IDE using File > Open Component

Workspace: Cool Stuff > COMSamples workspace
Component: 'Calendar Popup Example (non-data aware)' view

Workspace: Cool Stuff > COMSamples workspace
Component: 'Order Entry w/ data aware Calendar contr' view

Workspace: Cool Stuff > COMSamples workspace
Component: 'Internet Explorer Sample' view

Workspace: Cool Stuff > COMSamples workspace
Component: 'Media Player' view

Workspace: Sample Applications > Order
Component: All programs, views and other components

Workspace: Sample Applications > Order
Component: All programs, views and other components

Workspace: Sample Applications > Order
Component: DataDictionaries

Workspace: Sample Applications > Order
Component: 'Order Entry' view

Workspace: Cool Stuff > DataDefinition
Component: All

Workspace: Utilities > Conv2000
Component: 'Conversion' View

Workspace: Sample Applications > Contact
Component: 'Contacts' view

Workspace: Sample Applications > Order
Component: 'Customer Entry View' view

Workspace: Sample Applications > Order
Component: 'Sales Person Entry View' view

Workspace: Sample Applications > Order
Component: 'Vendor Entry View' view

Workspace: Sample Applications > Order
Component: 'Inventory Item View' view

Workspace: Sample Applications > Wines
Component: 'Wine Entry' view

Workspace: Sample Applications > Contact
Component: 'Contacts' view

Workspace: Cool Stuff > Embedded SQL
Component: All

Workspace: Sample Applications > Order
Component: Vendor DataDictionary

Workspace: Cool Stuff > DataDefinition
Component: All

Workspace: Sample Applications > Order
Component: Inventory DataDictionary

Workspace: Sample Applications > Order
Component: 'Order Entry' view

Workspace: Sample Applications > Contact
Component: 'Contacts' view

Workspace: Sample Applications > Order
Component: OrderDtl DataDictionary

Workspace: Sample Applications > Order
Component: 'Order Entry' view

Workspace: Sample Applications > Order
Component: 'Customer Entry' view

Workspace: Sample Applications > Contact
Component: 'Contacts' view

Workspace: Sample Applications > Order
Component: 'Order Entry' view

Workspace: Sample Applications > Contact
Component: 'Contacts' view

Workspace: Sample Applications > Wine
Component: 'Available Wines' lookup

Workspace: Sample Applications > Order
Component: 'Order Entry' view

Workspace: Sample Applications > Wine
Component: 'Wine Entry' view

Workspace: Sample Applications > Wine
Component: 'Wine Maintenance' view

Workspace: Cool Stuff > InetTransfer Sample Application
Component: All

Workspace: Cool Stuff > MAPI
Component: All

Workspace: Sample Applications > Wine
Component: Wines.mn

Workspace: Sample Applications > Wine
Component: NewMapi.mn

Workspace: Sample Applications > Order
Component: OrderToolbar.pkg

Workspace: Utilities > Conv2000
Component: 'Conversion' view

Workspace: Utilities > Conv2000
Component: 'Conversion' view

Workspace: Sample Applications > Wine
Component: 'Wines Entry' view

Workspace: Cool Stuff > InetTransfer Sample Application
Component: 'Upload File to FTP Server' view

Workspace: Sample Applications > Contact
Component: 'Contacts' view

Most reports use Radios and RadioGroups for selection criteria. See the Reporting section for details.

Workspace: Sample Applications > Contact
Component: 'Contacts Maintenance' report view

Workspace: Cool Stuff > OrgTreeView
Component: 'Organization TreeView' view

Workspace: Cool Stuff > InetTransfer Sample Application
Component: 'Download File from FTP Server' view

Workspace: Sample Applications > Order
Component: 'Customer Listing (Basic Report)' report view

Workspace: Sample Applications > Order
Component: 'Print Orders (Crystal)' report view

Workspace: Sample Applications > Order
Component: 'Print Orders by Customer' report view

Workspace: Sample Applications > Order
Component: 'Standard Customer Listing (Crystal)' report view

Workspace: Sample Applications > Order
Component: 'Crystal Report Info' report view & 'Crystal Report preview in DF Dialog' report view

These are 2 ReportViews that are not compiled into the Order Sample application, which do some very cool stuff:

Workspace: Sample Applications > Wine
Component: 'Wine Reports' report view

Workspace: Sample Applications > Contact
Component: 'Contacts List (from Wizard)' report view

Workspace: Sample Applications > Contact
Component: 'List Contacts (Summary)' report view

Workspace: Sample Applications > Contact
Component: 'List Contacts (Detail)' report view

Workspace: Sample Applications > Order
Component: All

Workspace: Sample Applications > Contact
Component: 'Contacts Maintenance' report view

Workspace: Sample Applications > Big
Component: All

Workspace: Sample Applications > Order
Component: 'Order Entry Sample Application' program

Workspace: Sample Applications > Wine
Component: 'Wines Program' program

Workspace: Cool Stuff > Embedded SQL
Component: All

Workspace: Sample Applications > Order
Component: 'Order' view

Workspace: Sample Applications > Order
Component: All views

Workspace: Utilities > VDFOEMAnsi
Component: 'OEM Ansi Converter' dialog

Workspace: Cool Stuff > InetTransfer Sample Application
Component: 'Upload File to FTP Server' view

Workspace: Cool Stuff > DataDefinition
Component: 'Sentinel for Database API Sample' program

Workspace: Cool Stuff > InetTransfer Sample Application
Component: 'Sentinel for InetTransfer Sample' program

Workspace: Cool Stuff > XML-Sample
Component: All

2. Samples Overview

List of Samples (click on a link to go to information about that sample)

Our samples are currently divided into 3 groups of workspaces:

COMSamples

General

Views

'Calendar Popup Example (non-data aware)' view

  • Demonstrates calendar popup ActiveX control using a non-synchronized prompt and a synchronized prompt.
  • To see an HTML explanation page for the ActiveX samples, run the application, open the Internet Explorer Sample view and click the Sample Info button.

'Order Entry w/ data aware Calendar contr' view

  • Nice demo of Order Entry View with embedded data-aware Calendar ActiveX control.
  • To see an HTML explanation page for the ActiveX samples, run the application, open the Internet Explorer Sample view and click the Sample Info button.

'Media Player' view

  • Demo of Windows Media Player ActiveX control.
  • To see an HTML explanation page for the ActiveX samples, run the application, open the Internet Explorer Sample view and click the Sample Info button.
  • Shows use of custom toolbar for a view.

'Internet Explorer Sample' view

  • Demo of Internet Explorer ActiveX control.
  • To see an HTML explanation page for the ActiveX samples, run the application, open the Internet Explorer Sample view and click the Sample Info button.

DataDefinition

General

Embedded SQL

General

INetTransfer

General

MAPI

General

OrgTreeView

General

XML-Sample

General

Views

Basic XML 1

  • Basic XML Parsing.

Basic XML 2

  • Writes data from a DDO to an XML document.

Basic XML 3

  • Reads XML document creates in Basic XML 2.

Basic XML 4

  • Writes data from one or multiple data files to an XML document.

Basic XML 5

  • Basic XSL transformation of an XML document and displays it as an HTML document.

Order Entry

General

Help

Views

'Order Entry' view

  • Header/detail type of view
    • child_table_state set to true
    • child_entering
  • Enabling/disabling of buttons and DEOs based on having a record found or not.
  • Spin button in dbGrid.
  • Custom confirm methods for save & delete.
  • Printing of current order from view.
  • dbSpinForm and dbComboForm controls.

'Customer Entry View' view

  • Shows tab dialogs.

'Inventory Item View' view

  • Shows 2 related, but unconstrained data files in non-dbGrid form (as opposed to header/dbGrid form like Order Entry).

Data Dictionaries

Order Header DD

  • Defaults date.
  • Decrements auto-increment field if sysfile eq last order number in Deleting.

Order Detail DD

  • Maintains totals in Update/Backout.
  • Maintains and adjust totals and prices during entry.

Inventory DD

  • Checks for inventory stock during Validate_Save.

Vendor DD

  • Simple validation for states.

Reports

Wines

General

Views

'Wines Entry' view

  • Header/detail type of view using a dbTabDialog to show details.
  • dbTabPages have icons on tab buttons.
  • ImageList for icons to use on dbTabPages.
  • Shows how to use a selection-list in a non-relational manner. The same list will also be used relationally in the Maintenance view.

'Wines Maintenance' view

  • Uses dbTabDialogView with separate DDOs for each dbTabView.

Reports

'Wine Reports' report view
  • Crystal Reports report with selection criteria.

Contacts

General

Views

'Contacts' view

  • Demonstrates 2 detail dbGrids from 2 separate child data files in header/detail scenario.
  • Uses dbEdit connected to same server as call detail records that shows notes for the current record in the dbGrid.
  • Shows use of non-data-aware radios (in RadioGroup).
  • Allows user to dynamically toggle constraint on or off using radios.

'Contacts Maintenance' view

  • Uses non-data-aware TabDialogs.
  • Uses BusinessProcess object (BPO) to import data from a text file and writes status data to statlog data file during processing.
  • Uses BusinessProcess object (BPO) to delete duplicate records from contacts data file and writes status data to statlog data file during processing.

Data Dictionaries

Calls DD

  • Defaults date.

Reports

'List Contacts (Summary)' report view
  • Winprint report with 3 different sets of possible constraints that can be toggled by selecting records from lookup lists or toggling radios.
  • Has set of radios for selecting report sort order.
'List Contacts (Detail)' report view
  • Winprint report with 4 different sets of possible constraints that can be toggled by selecting records from lookup lists or toggling radios.
  • Has set of radios for selecting report sort order.
  • Has checkbox for page break for each contact.

Big

General

CodeMnt

General

Conv2000

General

VDFOEMAnsi

General

Terms

  1. Hungarian Notation: Hungarian notation is a set of detailed guidelines for naming identifiers such as types and variables. The convention is widely used in many programming languages, especially in Windows programming. Hungarian Notation was first developed by Charles Simonyi at Microsoft Corporation. The link below is to a reprint of Simonyi's original publication describing Hungarian Notation in the Microsoft Developer Network (MSDN) Visual Studio documentation.

    MSDN Library, Visual Studio (General), Technical Articles: Hungarian Notation

    URL=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvsgen/html/hunganotat.asp

Additional Reading

Contacting Data Access Worldwide

Data Access Worldwide
14000 SW 119 Ave
Miami, FL 33186
305-238-0012
Domestic Sales: 800-451-3539
Fax: 305-238-0017
email: sales@dataaccess.com
Newsgroup Server: news.dataaccess.com
Internet: http://www.dataaccess.com

Data Access Worldwide - Asia Pacific
Suite 5, 333 Wantirna Road, Wantirna VIC 3152 Australia
Phone: +61 3 9800 4233 f: +61 3 9800 4255
Sales: asiapacific@DataAccess.com
Support: support.asiapacific@DataAccess.com
Internet: http://www.DataAccess.com/AsiaPacific

Data Access Worldwide - Brasil
Av.Paulista, 1776 - 21st.Floor
São Paulo -SP - Brazil
CEP 01310-921
Phone: 5511-3262-2000
Fax 5511-3284-1579
Sales: info@dataaccess.com.br
Support: suporte@dataaccess.com.br
Internet: http://www.dataaccess.com.br

Data Access Worldwide - Europe
Lansinkesweg 4
7553 AE Hengelo
The Netherlands
Telephone: +31 (0)74 - 255 56 09
Fax: +31 (0)74 - 250 34 66
Sales: info@dataaccess.nl
Support: support@dataaccess.nl
Internet: http://www.dataaccess.nl

Data Access Technical Support
800-451-3539 / 305-232-3142
email: support@dataaccess.com
Visit our Support Home page to see all of our Support options: http://www.dataaccess.com/support

Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles. 

Copyright Notice
This document is property of Data Access Corporation. With credit to Data Access Corporation for its authorship, you are encouraged to reproduce this information in any format either on paper or electronically, in whole or in part. You may publish this paper as a stand alone document within your own publications conditional on the maintenance of the intent, context, and integrity of the material as it is presented here.

DataFlex is a registered trademark of Data Access Corporation.

NO LIABILITY FOR CONSEQUENTIAL DAMAGES
To the maximum extent permitted by applicable law, in no event shall Data Access Corporation be liable for any special, incidental, indirect, or consequential damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use any information provided in this document, even if Data Access Corporation has been advised of the possibility of such damages. Because some states and jurisdictions do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you.