My.ADVISOR.com Sign-In
ID
Password

Member Center / Sign-Up
Go to Article
Advanced Search 

ADVISOR VIEW

Presenting Visual FoxPro 8

It's being touted as the best upgrade since Visual FoxPro 3. Here's the scoop.

By Tamar E. Granor, Technical Editor

There's tremendous excitement in the VFP community since Microsoft took the wraps off Visual FoxPro 8 at Visual FoxPro DevCon 2002 in Ft. Lauderdale. The general sentiment is that VFP 8, expected to be released early next year, represents the most significant upgrade since VFP 3.

In the August issue, I wrote about the features of VFP 8 that were public then. Here I give you a look at more features.

Easier handling of remote (and native) data

Two new classes, as well as changes to some existing classes, make it easier to work with data. The new CursorAdapter class provides a uniform interface for all kinds of data, both remote and local. You fill in properties that specify how data is to be retrieved and updated, and then a single method call creates and populates a VFP cursor. This means that when the back end for your application changes, all you have to change are some properties. The rest of your code works as always.

The XMLAdapter class makes it easier to work with hierarchical XML data, including Visual Studio .NET datasets and diffgrams. XMLAdapter uses two more classes, XMLTable and XMLField.

VFP 8 lets you subclass the DataEnvironment class (even visually), and then attach your subclasses to both forms (.SCX) and form classes (.VCX). The Cursor class can also be subclassed. So you can create a single data environment and use it with multiple forms. With the new subclassing ability, you can also add custom code to cursors and data environments, and know that it's used across the board.

Two new builders support all this: DataEnvironment and CursorAdapter.

There are a few other data-related changes (in addition to the ones I mentioned in August). Queries with the UNION clause now perform some type conversion, so you can, for example, pair a character field and a memo; the result uses a memo field in that position. When two matched fields are the same type but different lengths, VFP 8 chooses the larger size for the result field.
There are two extensions to the SQL INSERT command. INSERT INTO ... FROM NAME lets you add a row to a table with data from an existing object. INSERT INTO ... SELECT lets you add multiple rows based on the result of a query. The SCATTER NAME command has a new ADDITIVE clause that lets you add properties and data to an existing object.

Structured error handling

The TRY ... CATCH ... FINALLY structured error handling mechanism lets you deal with errors locally, and makes it easier to clean up when they occur. You put code that might fail in the TRY block, and then use one or more CATCH blocks to handle errors that occur. The FINALLY block contains code that should be executed whether or not an error occurs.

Along with this statement, when an error occurs in a TRY block, a new Exception object is populated with details about the error. The THROW command lets you escalate an error to a higher-level TRY structure.

Event binding

VFP 7 gave us the ability to bind VFP code to COM events (through the EventHandler() function). VFP 8 goes a step farther and lets us bind code to VFP events with the BINDEVENTS() function. Why would you bind one method to another event rather than just calling the method? The most obvious case is when you're dealing with code you can't change or subclass, such as a third-party tool.

RAISEEVENT() is a new function that lets you trigger an event. When you call the method associated with an event, the method code runs, but the event doesn't fire. RAISEEVENT() fires the event, too.

New tools

In addition to the new builders, VFP 8 contains several new tools. The Toolbox feels like a marriage between the Form Controls toolbar (which it's intended to replace) and the Component Gallery. It's far more capable than the toolbar, but much easier to use and understand than the Gallery. You can customize it to include the classes you work with regularly, and in fact, it can also hold pieces of text or pretty much anything else.

The Task Pane Manager gathers everyday tasks in one place. It comes with a variety of "task panes," pages that group related tasks together. One pane contains links to a variety of VFP support sites. Another pane is an Environment Manager, where you can specify a group of environmental settings and the projects to which they apply. It includes several other panes as well.

The new Code References tool lets you search for a string in a project or folder (including subfolders). Choosing an item from the list of matches opens the appropriate editing tool.

And there's more...

There's a lot more, including reporting improvements, but I've run out of space. We'll cover VFP 8 features in depth in coming issues, so stay tuned.

If you agree that the Microsoft Fox team has outdone itself with Visual FoxPro 8, the best way you can tell them is to upgrade as soon as the product becomes available.


Presenting Visual FoxPro 8

No reader comments ... yet.

    What do YOU think about this topic? Share your advice and thoughts using this form.

    Your Name

    REQUIRED : PUBLIC

    Your E-Mail

    REQUIRED : PRIVATE

    Job, Company

    OPTIONAL : PUBLIC

    City, State, Country

    OPTIONAL : PUBLIC

    Your Web Site

    OPTIONAL : PUBLIC

    Your Comment

    Please help everyone by keeping your comments on-topic, using clean language, and not defaming or making personal attacks.


    Your e-mail address is required, but it will not be displayed to the public or given to anyone. See our Privacy Policy. Comments become visible after they pass our spam filter, and spammers and abusers are permanently blocked. Please report spam or abuse.

    Technical Editor Tamar E. Granor, Ph.D., is the owner of Tomorrow's Solutions, LLC, a company that works with other developers through subcontracting and consulting. She is a Microsoft Certified Professional and a Microsoft Support Most Valuable Professional. Tamar is co-author of Hacker's Guide to Visual FoxPro 7.0 (Hentzenwerke Publishing), Microsoft Office Automation with Visual FoxPro, and other books. She is the Technical Editor of Visual FoxPro Certification Exam Study Guide. Tamar speaks frequently about Visual FoxPro at conferences and user groups in North America and Europe. tamar@thegranors.com.

    Printer-friendly
    page layout

    Keyword Tags: Application Development, Database, Database Development, Development, Microsoft, Microsoft Visual FoxPro

    ADVISORAMA
    The vice president simply presides over the Senate and sits around hoping for a funeral.
    -- Harry S. Truman, American president

    ARTICLE INFO

    DataBased Advisor

    Print Edition: December 2002, Page 7

    FREE ACCESS FREE ACCESS

    SUBSCRIPTION STATUS
    You are not signed-in. If you are a subscriber to this publication, sign-in above to access locked articles. To subscribe or renew go to www.AdvisorStore.com.

    Subscribe to DATABASED.ADVISOR.com

    Get it all -- every current and past ADVISOR tech/business publication, now all-in-one subscription, with new articles and a huge reference library packed with expert advice, how-to and downloads. Subscribe now to get it all.

    DataBased.Advisor.com

    Subscribe to FileMaker Advisor Magazine

    Read the advanced guide to creating custom business database solutions with FileMaker software. Subscribe now to gain access to all the archives and downloads.

    FileMaker.Advisor.com

    Subscribe to Advisor Basics of FileMaker Pro

    Learn the fundamentals of using FileMaker Pro software. Every issue gives you step-by-step instructions on creating the databases you need. Subscribe now!

    FileMaker.AdvisorBasics.com

    Showcase Your Smarts

    Submit your tips, techniques and advice and let Advisor promote your business and build your career. Show the world what you know!

    AdvisorTips.com

    Use of this or any other site, content, product or service of Advisor Media constitutes acceptance of Terms of Use.
    Portions copyright ©1983-2008 Advisor Media, Inc. All Rights Reserved.
    Reuse or reproduction of any portion or quantity of Advisor Media's copyrighted content, in any form, for any purpose, requires written permission.
    ADVISOR®, the ADVISOR logo, and other names and logos that incorporate ADVISOR are registered trademarks, trademarks or service marks of Advisor Media, Inc. in the United States and/or other countries.
    Other trademarks are used for identification, editorial or descriptive purposes and are the property of their owners.
    Hosted by Prominic.NET Website powered by
    LOTUS SOFTWARE
    GRANT118 posted 11/07/2002 modified 01/09/2009 03:40:08 AM ztdbms/ztdbms
    domino-144.advisor.com my.advisor.com 01/09/2009 01:28:10 PM