My.ADVISOR.com Sign-In
ID
Password

Member Center / Sign-Up
Go to Article
Advanced Search 

ADVISOR VIEW

Control Amid Chaos

How do you deal with a lack of control over your application's environment? Plus, VFP 7 SP1 is available -- go get it!

By Tamar E. Granor, Technical Editor, FoxPro Advisor

Remember the days when you could totally control what was on the machines that ran your applications? When you didn't have to worry about interactions with other software or hardware? I had another reminder recently just how gone those days are. Another developer hired me to automate the production of a particularly complex report. It required intricate formatting that was beyond the capabilities of VFP's Report Designer. In fact, even in Word, it was far from easy.

Before beginning, I confirmed with the other developer that the target for this task was VFP 7.0 automating Word 2000. Many hours later, I had the thing working with the sample data I'd been provided. I sent it to my client, indicating it had to be tested with a larger data set.

That began several weeks of working with the client. He couldn't get my code to run consistently. The first time he ran it, all was well, but subsequent runs bombed with an OLE error. I couldn't replicate his error. As we worked our way through the issue, the first thing I learned was that he was running Word XP, not Word 2000.

Patching it up

After a lot of back and forth, we determined that whatever was going on was a timing problem. When he stepped through the test program, it worked fine, but running it at full speed failed. Sure enough, adding a brief WAIT TIMEOUT just before the command that caused the error solved the problem, but that was only a patch. We really needed to know whether this was due to a problem in Word XP, or something else, so the other developer could know what to tell his client, the ultimate user of this application.

I asked around among the Word and Office experts I know and Beth Melton, a Word MVP, came up with the answer. The problem wasn't with Word at all, but with the Office Plug-In component of Norton Anti-Virus (NAV). It slowed things down enough that the automation process was failing. Sure enough, when my client disabled that plug-in, the problem went away.

This leaves us with a larger problem. How do we ensure that the client doesn't run into this problem or a similar one? My client can't control what anti-virus software his client uses. He can certainly tell them that NAV's Office Plug-In will cause problems, but can we be sure that's the only potential problem?

The code that fails is fairly standard automation code. If another product that isn't even part of this process can make that code fail, how can we ensure any code is safe? Code that performs computations within a single product is probably unlikely to run into issues, but any code that talks to the file system or interoperates among multiple applications seems to be vulnerable to this kind of problem.

While we ultimately found a workaround for this problem, I'm interested in hearing if you've faced similar issues and what you did to make your code work. (Send a description to FoxPro@Advisor.com.)

VFP 7.0 Service Pack 1

We're already reaping dividends from the decision to separate VFP from the other Visual Studio products. The first, of course, was that VFP 7.0 shipped last summer, while Visual Studio .NET was released in January 2002. The second tangible bonus is now available: Service Pack 1 for VFP 7.0.

Because Microsoft released hot fixes right away for a few serious problems, the six-month lapse between product and service pack release seems like just about the right timeframe -- long enough to let people find the problems, but fast enough to keep them from being a major headache.

What's in this service pack?

This service pack contains almost entirely bug fixes. There's one minor enhancement: XMLToCursor() has a new flag that lets you add data to an existing cursor.

What's fixed? A variety of bugs, most of them minor, but a few that have been showstoppers for some people. Probably the highest-profile item is a problem that leads VFP itself or a VFP application at runtime to stay on top of other applications.

A number of fatal errors (including some C0000005 bugs) are fixed. VFP 7.0 is stable to begin with, so this service pack makes it perhaps the most stable version of FoxPro ever.

If you're already using VFP 7.0, download and install the service pack right away (http://msdn.Microsoft.com/vfoxpro). If you're one of those cautious folks who likes to wait for Microsoft to iron out any problems, your wait is over. Go ahead and upgrade now, then download the service pack. Note the service pack is available only as a download; it won't be integrated into the packaged product. After you start working with VFP 7.0, you'll wonder what you were waiting for.


Control Amid Chaos

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.

    Tamar E. GranorTamar E. Granor, Ph.D., owns Tomorrow's Solutions, a company that works with other developers through subcontracting and consulting. Tamar is a Microsoft Certified Professional, a Microsoft Support Most Valuable Professional, and a technical editor of FoxPro Advisor. She is co-author of What's New in Nine, Microsoft Office Automation with Visual FoxPro, Taming Visual FoxPro's SQL, and a number of other books. Tamar speaks about Visual FoxPro at conferences and user groups in North America and Europe. tamar@tomorrowssolutionsllc.com

    Printer-friendly
    page layout

    Keyword Tags: Application Development, Bug, Database, Database Development, Debugging, Development, Microsoft, Microsoft Office, Microsoft Visual FoxPro, Microsoft Visual Studio, Microsoft Word, Product Development, Programming, System Management, Technology Management, Virus Protection

    ADVISORAMA
    It is possible to commit no mistakes and still lose. That is not a weakness. That is life.
    -- Capt. Jean-Luc Picard, Star Trek: The Next Generation

    ARTICLE INFO

    DataBased Advisor

    Print Edition: March 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
    GRANT108 posted 02/11/2002 modified 01/07/2009 03:39:42 AM ztdbms/ztdbms
    domino-144.advisor.com my.advisor.com 01/07/2009 01:57:29 PM