====================================== FoxPro Developers Network of San Diego ====================================== FoxDev TipsLetter #02-05 29 April, 2002 Website: Editor: ---------------------------------------------------------------------- CONTENTS: * Calendar * Tech Tips: Knowledge Base Updates Dan Covill VFP Tools for .NET Dan Covill DoEvents And The Mouse * Links: Where Can I Find...? * Other Stuff: VFP Survey Ken Levy Types of People Art Bergquist Visual FoxPro News Ken Levy UCITA - A Nightmare Scenario M. E. Kabay Hacker's Guide 7 Now Available Notes on Usability * Administrivia ====================================================================== CALENDAR: Thurs - May 16 - Drew Speedie ----------------------------- Tips and Trick with VFP Thurs - June 13 - Mike Stewart ------------------------------ Microsoft's Mike Stewart will be presenting his topic on software testing. For those of you who were at the San Diego Devcon, he did this presentation there. Wed - July 10 - Victor Campos ------------------------------ Business Objects in VFP: A lot of speakers tend to present this topic with examples pulled from their framework - unfortunately, in order to utilize the examples and learn from them you have to buy the framework. Victor's presentation is put together with code that is not part of any framework and therefore can be put into practice directly, or may be used to learn from. It's not any code to begin building enterprise applications, but, it's a perfect way to get started on the learning curve that many VFP Developers are still struggling with. Thus - August 15 - Mike Feltman -------------------------------- Visual Fox Express ------------------------------- Escondido meetings are at Bergelectric, 2222 Meyers Avenue. All meetings are at 6:30 pm. Take the Nordahl exit from Highway 78 (west of I-15). Head South, cross Mission at the lights. Next right onto Meyers Ave. Berg Electric is a one-story building on the right, just before Oper Street (there's no sign). ====================================================================== TIPS ====================================================================== KNOWLEDGE BASE ARTICLES ON VFP by Dan Covill [I just subscribed to a wonderful service called KbAlertz. It sends me an e-mail once a week listing all the new and updated Knowledge Base articles on VFP. The service is free, and you can pick the MS products you want to be alerted on. Here's what I've gotten so far. DC] Received during March: ---------------------- Q318995 FIX: Error Occurs When You Issue the TEXT TO and SET TEXTMERGE Commands Q318985 FIX: Error Occurs When You Use a Left Parenthesis in a CREATE SQL VIEW Command Q318261 FIX: Grid Lines Assume the Windows Font Color Q318980 FIX: Internal Consistency Error Occurs After You Delete Records in a Buffered Table Q319041 FIX: Internal Consistency Error Occurs with Buffered Data and GOTO Command Q319001 FIX: SEEK(), INDEXSEEK(), and LOOKUP() Find Nonexistent Record when Used with SET KEY Command April 03: --------- Q319276 FIX: Fatal Exception Error When you Pass an Alpha Character to the VAL() Function Q318990 FIX: Reserved Word "IsDataSet" in CURSORTOXML Schema Is Misspelled Q317980 FIX: When You Use Table Buffering and Insert Records FoxPro May Stop Responding April 10 -------- Q318706 FIX: Cannot Implement Office Add-in IDTExtensibility2 Interface Q318971 FIX: CTOT() Function Returns Blank Value on an XML DateTime Expression Q268771 FIX: DOEVENTS Command Runs Slowly ** See following article ** Q318991 FIX: Memory Leak with Function Call in SELECT Statement with ORDER BY Clause After Error Has Occurred April 17: --------- Q100998 BUG: ? Command with FONT Clause Prints Double Spaced Q319284 FIX: Record Count Reset When You Run END TRANSACTION Command Against a Remote View Q248608 INFO: SQL SELECT Optimization Levels and Performance Q268553 PRB: Visual Studio, Office Developer Installation Problems Occur If Crystal Reports 8 Is Installed Q318997 FIX: Report Form ASCII Clause Allows No White Space Q318902 FIX: Visual FoxPro 7.0 Quits When You Run a Form with Grid April 24: --------- Q316914 BUG: Menu Generated With SKIP FOR that Contains .F. Is Missing SKIP FOR How To Look Up These Articles: The links included in the e-mail from KbAlertz are indirect links thru their website, so I didn't reproduce them here. The easiest way to get to a specific KB article is as follows: a. Go to support.microsoft.com. Search is at left of the page. b. Select "Visual FoxPro" on the drop-down. c. Enter the document number in the textbox below it. d. Click on the green arrow. [For some reason, entering the document # in Google no longer seems to work. But MS has re-designed their own KB search. Is this a coincidence? DC] FIXes: Almost all of the Fixes are included in SP1 (or in VFP 7 itself). To Subscribe: Subscribe at . You can specify any MS product to receive alerts on. ---------------------------------------------------------------------- VFP TOOLS FOR .NET by Dan Covill The VFP Team has created a section on the DotNet website for VFP tools and usage. That's a good thing, because it helps tell those pursuing MSs latest and greatest that VFP does exist. "The Visual FoxPro Toolkit for .NET is a class library with over 225 Visual FoxPro 7.0 functions for use with any .NET language. Using the VFP Toolkit or .NET, most Visual FoxPro 7.0 functions become available in the Visual Basic .NET or any other .NET language." Even if you aren't going .NET, check out the other VFP info. www.gotdotnet.com/team/vfp ---------------------------------------------------------------------- DOEVENTS AND THE MOUSE [This is the text for Q268771 - DOEVENTS Command Runs Slowly. The charming thing about it is that the program runs faster when you move the mouse around! Even more charming, the solution is to move the mouse programmatically, saving all that wear and tear on your wrist. It's fixed in VFP 7. DC] SYMPTOMS The DOEVENTS command allows your program to yield time to process Windows events. However, in tight loops, DOEVENTS waits for an excessive amount of time for an event. RESOLUTION Use the MOUSE command as shown in "More Information" to give DOEVENTS something to read. Copy the following code into a program file, and note the speed difference between the call to DOEVENTS and the call to FastDoEvents. NOTE: This code works better if there is actually a window open. If there is no window open, DOEVENTS and FastDoEvents have similar execution times, which fall between the times recorded with a window open. lnSeconds = SECONDS() FOR i = 1 to 50 DOEVENTS ENDfor ? "Total time: " + STR(SECONDS() - lnSeconds, 7, 4) lnSeconds = SECONDS() FOR i = 1 to 50 FastDoEvents() ENDfor ? "Total time: " + STR(SECONDS() - lnSeconds, 7, 4) FUNCTION FastDoEvents LOCAL lnRow, lnCol, lcWindow lcWindow = WONTOP() lnRow = MROW(lcWindow) lnCol = MCOL(lcWindow) IF ( lnRow > 0 ) AND ( lnCol > 0 ) IF NOT EMPTY(lcWindow) MOUSE AT lnRow, lnCol WINDOW (lcWindow) ELSE MOUSE AT lnRow, lnCol ENDif ELSE KEYBOARD " " =INKEY() ENDif DOEVENTS RETURN ====================================================================== LINKS ====================================================================== This is a (semi) permanent list of places to look for technical help when you get blind-sided by the latest urgent requirement. We don't give specific URLs for MSDN articles because (a) they're too long and (b) they change too often! ------------------------------- MSDN ON LINE: There's a ton of stuff here, look at the Magazines tab, and read some of the regular columns. MSDN Library Look in Technical Articles | Visual Studio | Visual FoxPro MSDN Library: "Building Three-Tier Client/Server Applications with Visual FoxPro" ADO MSDN Library: ADO Jumpstart for Microsoft Visual FoxPro Developers John V. Petersen, April 1999 DNA (Distributed interNet Architecture): MSDN On-line: "Top Windows DNA Performance Mistakes and How to Prevent Them" FoxPro 2.6: http://members.aol.com/FoxProResources/fpfp.htm MTS: Microsoft Transaction Server MSDN Library: "Microsoft Transaction Server for Visual FoxPro Developers" ODBC: MSDN Library: "Using Visual FoxPro to Access Remote Data" ODBC drivers are part of MDAC - Microsoft Data Access Components - and are available for download at: "www.microsoft.com/data" VS Installer: MSDN Library: a. "Using Visual Studio Installer for VFP 6.0 Applications" b. "VFP 6.0 and VS Installer Tutorial" VFP Publications: www.advisor.com FoxPro Advisor www.pinpub.com FoxTalk magazine www.hentzenwerke.com Hentzen Publishing (Books, discussion, and downloads) VFP General: msdn.microsoft.com/vfoxpro Microsoft's official VFP home page www.foxcentral.net Joint effort by Microsoft, West-Wind, and the Universal Thread Lots of news and development info. MS Developer Applications Forum on Compuserve http://go.compuserve.com/msdevapps The History of FoxPro (submitted by Steve Settimi) www.foxprohistory.org The Universal Thread http://www.universalthread.com The "Wiki" www.wikis.com fox.wikis.com fox.wikis.com/wc.dll?Wiki~FoxForumWiki Here is the most complete set of FoxPro links you're likely to find: http://www.cetus-links.org/oo_visual_foxpro.html Private websites with useful free info and downloads: www.prolib.de/foxlinks.afp (wOOdy Wondzinski) www.honeypass.com (Allen Pollard) www.ukfug.org.uk British user group www.lafox.org LA user group www.pinter.com/ Les Pinter www.vfug.org/ Virtual Fox User Group www.leafe.com Ed Leave, ProFox listserve www.jamesbooth.com www.foxforum.com www.foxfolk.com www.stevenblack.com www.craigberntson.com WEB Development: These products all work well with VFP. AFP www.afpweb.com and www.afpages.com DotFox www.elsoftware.com FoxWeb www.foxweb.com Web Connection www.west-wind.com X-WORKS www.x-works.com Windows General Win32 API (with VFP examples) XML - What's New in XML for Microsoft Windows 2000 See also OLE DB drivers for XML in MDAC 2.6 at "microsoft.com/data" [Contributions solicited. DC] ====================================================================== OTHER STUFF ====================================================================== VFP SURVEY by Ken Levy The VFP Team at Microsoft invites you to participate in our brief survey for Visual FoxPro. This survey only takes a few minutes to complete and you will have the opportunity to win a GREAT PRIZE. This is also a great opportunity for you to provide important information to Microsoft about your needs and usage of Visual FoxPro. To participate in this survey, go to: http://surveys.maritz.com/s250/index.html?name=site5&password= As a thank you for your time, you will be entered in a PRIZE drawing. There will be one prize of a free registration pass to Visual FoxPro DevCon 2002 worth over $1000, one cash prize of $500, and five cash prizes of $100. You must complete the survey by midnight on Sunday, May 12th, 2002 to be eligible for the drawing. Winners will be notified by e-mail by May 25, 2002. To access the official sweepstakes rules, go to: http://surveys.maritz.com/s250//rules.html Thank you for participating in this survey to assist Microsoft in better serving your needs of Visual FoxPro and other technologies. The VFP Team Microsoft ---------------------------------------------------------------------- TYPES OF PEOPLE "There are only 10 types of people in the world - those who understand binary, and those who don't." - unknown [submitted by Art Bergquist] ---------------------------------------------------------------------- VISUAL FOXPRO NEWS by Ken Levy Microsoft has no plans for any additional updates of Visual FoxPro 7.0 such as a SP2 (Service Pack 2). SP1 for VFP 7.0 can be downloaded from http://msdn.microsoft.com/vfoxpro/downloads/updates.asp. VFP 7.0 with SP1 is the most stable version of Visual FoxPro ever released by Microsoft. If you have not yet upgraded to VFP 7.0, now is a great time to do so. ------- Huh? ------- [This paragraph caused a lot of consternation - some of us wondered if this was announcing the end of VFP! Not so. Ken issued this clarification a couple of days later. DC] Some people have indicated confusion in my message, so here is a clarification. As the message says, there are no plans for any updates to version 7.0 like another service pack. It makes no reference to the next "version" of VFP which the Fox team at Microsoft is and has been actively working on. Some people have indicated that they are waiting for an SP2 for VFP7 before upgrading, so I thought I would let people know there is no SP2 planned and they should not wait to upgrade. [In other words , SP1 fixed most of the problems, so there's no point in waiting any longer before upgrading - this one is fine. And, once more, VFP7 is not dead. DC] ------------------- [continuing with the original message...] There will be an online web survey for Visual FoxPro coming in about a week, please participate when you receive an email or see the link to it online to help the Visual FoxPro team at Microsoft. There are some online articles I encourage you to read at the links below. More news will be announced in the keynote session at the EssentialFox (http://essentialfox.com) conference April 26th. Ken Levy Visual FoxPro Product Manager Microsoft http://msdn.microsoft.com/vfoxpro http://foxcentral.net http://advisor.com/Articles.nsf/aid/LEVYK02 Memo from Ken Levy - Latest Activities Advisor View article from FoxPro Advisor Magazine by Ken Levy, Microsoft Visual FoxPro Product Manager. Activities within Microsoft and the FoxPro community are increasing, and many new and exciting surprises are planned for this year. http://advisor.com/Articles.nsf/aid/LEVYK03 Memo from Ken Levy - Overview of XML Web services Advisor View article from FoxPro Advisor Magazine by Ken Levy, Microsoft Visual FoxPro Product Manager. XML Web services accelerate the exchange of information across businesses, devices, and applications, thereby making companies more efficient and ultimately, more profitable. XML Web services will radically expand the use of the Internet and create new business opportunities in the process. [** following link is wrapped!] http://msdn.microsoft.com/library/default.asp?url=/library/en- us/dnfoxgen7/html/usingaspnetwithvfp7.asp Using ASP.NET in Visual Studio .NET with Visual FoxPro 7.0 MSDN Library whitepaper written by Cathi Gero and edited by Andy Kramek. Learn the key technologies involved in using Visual Studio .NET to create Web Forms using ASP.NET and ADO.NET. Four fully documented examples illustrating how Visual FoxPro 7.0 can be used in this environment are included. Each of these examples illustrates how easily and seamlessly Visual FoxPro 7.0 can be integrated into Web Form-based applications. (29 printed pages) ---------------------------------------------------------------------- UCITA - A NIGHTMARE SCENARIO M. E. Kabay [From a longer article in the ACM's Ubiquity magazine. See if the "Nightmare" doesn't scare you, too. DC] http://www.acm.org/ubiquity/views/m_kabay_8.html The Uniform Computer Information Transactions Act (UCITA) is a proposed general format for state laws convering software licenses and other aspects of electronic commerce. Among other protections for vendors, the UCITA provides for * rigid enforcement of shrink-wrapped licenses even though the buyer may not see or agree to the terms until after the software has been purchased; * banning reverse engineering of proprietary software; * allowing vendors to shut down software remotely if they suspect a violation of the licensing terms; * easier disclaimer of written warranties. A Nightmare Scenario: It is the year 2006. Jamal is the network manager for a company with 10,000 PCs running Fenestration YQ2, an older version of the Fenestration operating system (the current version is Fenestration YQ4). In 2003, Mocraherd, the software supplier, changed the terms of the software license so that each license expires after one year; to renew the license, Jamal's company has to pay a renewal fee -- or the operating system shuts down for good and the company has to purchase completely new licenses at a higher price. Now Mocraherd has told Jamal that he is required to upgrade to YQ5 within the next couple of months or lose his corporate licenses altogether. The problem is that the new Fenestration YQ5 that's being advertised requires over 2 GB of free disc space for the operating system upgrade and a minimum of 512MB of RAM plus a 2.0 GHz processor as minimum configurations -- and upgrading the company's computers would cost at least $500 each. Including the cost of upgrading to YQ5 ($50 per system), that makes a total cost of around $5.5 million -- not including the cost of labor and downtime. Worse still, reports in the underground press (it's a violation of license to publish or read any material that is critical of Mocraherd or Fenestration version using Mocraherd products) indicate that the new YP version takes four hours to install, fails in a third of the installations, and does not support the type of printer, external removable hard drives, or scanners that Jamal has installed on half of his systems. Jamal's options are limited. He knows that Fenestration YQ2 includes spyware that automatically reports on the states of all machines where it has been installed; he knows because in several cases, changing defective mother boards on some downed PCs resulted in complete shutdown of the operating system. Jamal's staff had to call Mocraherd and get permission to reactivate the OS using a new license code. ... ... Worse still, the new Fenestration YQ5 OS does not run the old version of the Officious product suite (Verb word processor, Punctuate display software, Crunch spreadsheet and Excess database) and files created with the new version of the Officious suite are not usable by the old Officious products. Jamal decides to investigate alternatives to running Mocraherd programs altogether. He scans a few articles online about possible competitors using the Mocraherd Internet Exploder browser; as far as he can see, the costs of conversion would be prohibitive and the range of programs is inadequate to replace the Mocraherd programs. An hour later, he receives a legal writ via e-mail warning him that he has violated the terms of his software license by accessing sites that are hostile to the interests of Mocraherd. Then his computer shuts down due to a remote signal from the Mocraherd Web site. Because the corporate license covers all the computers in the company, all the other computers shut down within minutes too. Finally, the electrical power, telephone, and HVAC (heating, ventilation and air-conditioning) computers shut down too even though all of them are running on separate licenses of Fenestration YQ2. No matter: an error in the programming on the Mocraherd servers automatically assumes that all computers that are co-located are on the same license. Jamal waits in the dark and wonders what to do next. * * * From the license for FrontPage 2002: "`You may not use the Software in connection with any site that disparages Microsoft, MSN, MSNBC, Expedia, or their products or services . . . ' the license reads in part." -- Ed Foster, "A punitive puppeteer?" www.infoworld.com/articles/op/xml/01/09/17/010917opfoster.xml * * * Windows Update checks the Microsoft site every five minutes and alerts users when critical updates are available; in order to tell if such updates are required, each system reports on its configuration so the server process can tell if it needs changes. This process cannot be stopped once it starts (short of uninstalling the product). The Microsoft Knowledge Base confirms that no user intervention is permitted: "Question: Can I change the scheduled behavior of Windows Critical Update Notification? Answer: No, if the scheduled task is modified, the tool reverts to the default settings the next time Windows Critical Update Notification runs. Note that this behavior is by design to ensure that you are notified of updates in a timely manner." http://support.microsoft.com/support/kb/articles/Q224/4/20.ASP * * * [The complete article includes arguments both for and against UCITA. DC] ---------------------------------------------------------------------- HACKER'S GUIDE TO VISUAL FOXPRO 7.0 RELEASED Milwaukee, WI -- Ted Roche & Associates, LLC and Hentzenwerke Publishing are pleased to announce the publication of "Hacker's Guide to Visual FoxPro 7.0" by Tamar E. Granor, Ted Roche, Doug Hennig and Della Martin. This book, the third edition of the award-winning book, details the functionality of Microsoft's Visual FoxPro 7.0 from the tell-it-like-it-is, real-world developer's standpoint. Often witty and always informative, the "Hacker's Guide to Visual FoxPro 7.0" is an essential, timesaving tool for any serious FoxPro developer. The "Hacker's Guide to Visual FoxPro 7.0" has been recognized within the FoxPro developer community as the indispensable resource for serious FoxPro development. The second edition of the book won the "Developer's Choice" award in May 2000. For more information or to order the book, visit the publisher's site at http://www.hentzenwerke.com. Visual FoxPro is Microsoft's premier development tool for manipulating large databases in Web-based, client-server, and desktop environments, and was the first Microsoft tool to support Web Services, a key element in Microsoft's .NET brand of tools and services. Find more information on Visual FoxPro at http://msdn.microsoft.com/vfoxpro. ---------------------------------------------------------------------- NOTES ON USABILITY from Interactions, March-April 2002 Special Issue on Interface Design Aaron Marcus, "Metaphors and User Interfaces in the 21st Century" "Some have argued that having to store files in separate groups related to applications that are also stored in separate groups might do as much damage to mental health, and productive time, as the harm that using the BASIC programming language was supposed to cause in the 1980s. Having to store e-mail messages and references about metaphors in a place separate from text documents about the same content seems clumsy, and a number of solutions have been proposed, such as Apple's OpenDoc or some offshoots of the Be Operating System (now part of Palm), which enable users to focus on contents rather than tools." [Pardon me, Aaron, but this wasn't a problem in DOS - you could store everything in a project directory and call the tools you needed - WordStar, FoxPro, Lotus 123, etc. to work on them where they were. Windows invented the "each application decides where its data files go" philosophy, and hard-coded the paths into the accursed Registry. DC] Bruce Allen & Elizabeth Buie "What's in a Word? The Semantics of Usability" Intuitive: "The only intuitive user interface is the nipple." User-friendly: "Users don't want the computer as a friend -- they want it as a tool that will do stuff for them." Subjective: "People who say that design is all subjective are not talking about design for usability - they are talking about _style_." "You don't design interfaces [for accurate and efficient work] by having the graphic arts department try Miracle Pink for the first time, no matter how much they like it." "Research findings show no relationship between users' subjective ratings of a product and their objectively measured performance in using it." --------------------------Administrivia------------------------------- This newsletter is a service to all FoxPro developers, provided without charge by the FoxPro Developers Network of San Diego (FPDN). Anyone may subscribe (or unsubscribe) at our web site . The link is on the home page. The Resources button on the website will take you to the back issues of the newsletter. The editor (Dan Covill) is solely responsible for the content. E-mail him with YOUR tips, comments, or complaints. Editor: Dan Covill 858-272-2448 dcovill@acm.org Board of Directors: Eric Lendvai - President 760-734-4929 eric@elsoftware.com Art Bergquist - Vice Pres 760-740-0428 abergquist@sbcglobal.net Claude Nikula - Secretary 619-615-6318 crndev@cox.net Barbara Peisch - Treasurer 760-729-9607 barbara@peisch.com Dan Covill - Director 858-272-2448 dcovill@acm.org Thad V'Soske - Director 619-544-9900 tvsoske@hanoverdirect.com ----------------------------------------------------------------------