====================================== FoxPro Developers Network of San Diego ====================================== FoxDev TipsLetter #01-10 30 September, 2001 Website: Editor: ---------------------------------------------------------------------- CONTENTS: * Calendar ** Wednesday, October 3! ** * Elections Wednesday, November 7 * Tech Tips: Losing Screen Files in W2000 Dan Covill * Links: Where Can I Find...? * Other Stuff: DevCon Keynote Address Notes on DevCon Dan Covill CodeMine Sample Available Dan Covill Getting Good Quickly ACM Ubiquity * Administrivia ====================================================================== CALENDAR: All meetings are in Escondido, at 6:30 pm. *** NOTE CHANGE IN OCTOBER/NOVEMBER MEETINGS *** October 3 --------- Kevin McNeish on Web Services. Kevin McNeish is President of Oak Leaf Enterprises and creater of the Mere Mortals framework. He is a regular DevCon speaker and co-author of "What's New in Visual FoxPro 7". November 7 ---------- Tips and Tricks This month we'll have the Tips and Trick meeting we originally scheduled for August. If you have a tip or trick you'd like to share, let Barbara Peisch know. ** ELECTIONS ** Our annual elections will take place at this meeting. December ?? ----------- Our annual holiday dinner party will be in December. Details (including the date) will be announced later. January 2 --------- Barbara Peisch - An intro to Web Connection, Part 1 This presentation will give an overview of how Web Connection works, and the basics of building an application and setting up the configuration. February 6 ---------- Barbara Peisch - An intro to Web Connection, Part 2 This presentation will cover the basics of deploying an app to a live web server. --------------------------------------------------------------- Escondido meetings are at Bergelectric, 2222 Meyers Avenue. Take the Nordahl exit from Highway 78 (west of I-15). Head South. Right on Meyers Ave, first right past Mission. It's a one-story building on the right (there's no sign). ---------------------------------------------------------------------- ELECTIONS IN NOVEMBER Our annual elections take place at the November meeting. Take a look at the list of Officers and Board members at the end of this newsletter, then call or e-mail Barbara Peisch and tell her which office you'd like to run for. If you don't, we'll all be re-elected. You wouldn't want to be responsible for that happening, would you? Dan Covill ====================================================================== TIPS ====================================================================== LOSING SCREEN FILES IN WINDOWS 2000 by Dan Covill I spent some time at DevCon talking to Jim Saunders and Mike Stewart of Microsoft about the infamous corrupted SCX problem. Yes, it's real. It has happened to them. And the official word is that it's been fixed in VFP7. The reason they haven't told us how to fix it in VFP6 is that they're not real sure. So here's what I know about it. The Problem: If you work in VFP6 under Windows 2000, and your system or server fails (power failure etc), you may lose some or all of the SCX/SCT files that you have modified in the recent past (NOT just the ones you were working on when things crashed!). This appears to happen only if: a. The files are stored on a machine running Windows 2000. b. The files are stored on an NTFS partition. c. Write caching is enabled for that physical drive. d. The failure is one that causes an NTFS "rollback" recovery. The result is that all modified SCX/SCT files become zero-length. The Reason: There are two pieces to the problem: a. The TEMP attribute - new to Win2K NTFS partitions. b. Write caching - on by default in Win2K. There is a new file attribute in Win2K NTFS. Bit 8 (counting from the right as bit 0, shows as 0x0100) is the TEMP attribute. This attribute does NOT show up in the adir() result (column 5) - you have to use a WinAPI call to see it. For reasons unknown, the Temporary attribute is set in all SCX _and_ SCT files modified by the VFP6 Form Designer. The Form Designer sets the attribute in both files and it never gets reset. Apparently (this is conjecture, not confirmed by Microsoft) when an NTFS volume is rolled back after a crash, all files marked TEMP are cleared - i.e., their contents are deleted and only the directory entry remains. Write caching is on by default in Windows 2000. Apparently this increases the chance of a "rollback" on an NTFS volume after a crash - I have not been able to cause the problem with write caching disabled. The Cure: 1. The problem will not occur if you do not use Win2000, do not use an NTFS partition, or use VFP7. 2. You can prevent the problem by resetting the TEMP attribute after modifying screen files. (We believe that is what is "fixed" in VFP7.) [The TEMP attribute can be cleared by copying the files to a non-NTFS partition and then back. I also have a small VFP program that does it. E-mail me if you'd like a copy. DC] 3. You can (probably) prevent the problem by turning off the default write caching. Here's how: a. Control Panel | System b. Select the Hardware tab c. Click on Device Manager d. In the tree view, expand Disk Drives. e. Double-click on the (physical) drive with the NTFS partition. f. Select the Disk Properties tab. g. UN-CLICK the "Write cache enabled" checkbox. Note: Several people have reported that write caching was re-enabled when they re-booted. This appears to be true only if SP2 has not been installed. Comments: While this doesn't affect many people, when it does it's a catastrophe. You lose ALL the sc* files you've modified while on your NTFS partition, no matter how many days have gone by since you did it. I recommend you turn off write caching AND clear the TEMP attributes as well. Thanks to wOOdy (Juergen Wondzinski) for the info about the TEMP attribute and how to reset it. Dan Covill Middleton Consulting Inc. dcovill@san.rr.com ====================================================================== 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 3-Tier Apps: 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" 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 General: This is the most complete set of FoxPro links you're likely to find: http://www.cetus-links.org/oo_visual_foxpro.html WEB Development: These products all work well with VFP. DotFox www.elsoftware.com WestWind www.west-wind.com FoxWeb www.foxweb.com AFP www.afpweb.com and www.afpages.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 ====================================================================== DEVCON KEYNOTE ADDRESS VFP DevCon 2001 Keynote: Visual FoxPro 7.0 and Beyond View the keynote session given by Microsoft Visual FoxPro team members Ken Levy, Randy Brown, and Calvin Hsia on September 10, 2001 at Advisor VFP DevCon. http://msdn.microsoft.com/vfoxpro/ (56K and 300K speeds available) Ken Levy Visual FoxPro Product Manager ---------------------------------------------------------------------- THOUGHTS ON DEVCON by Dan Covill Here are a few of my thoughts on DevCon, in no particular order. Ken Levy's enthusiasm for his new job is obvious, and I think he's headed in the right direction. His emphasis is on marketing VFP within Microsoft, and marketing by example rather than by advertising. He's working to include VFP stuff in the MSDN magazine/newsletter and is working to provide a central spot for VFP case studies. Most important, he is visiting MS regional offices to remind them that VFP exists and is a valid alternative for developing applications. Good on you, Ken! There were between 750 and 800 attendees. The average age, to my surprise, was nearer 45 than 25! Lots of gray hair - I kind of blended in. Sessions were generally excellent. Presenters were uniformly well organized. There is no good reason not to switch to VFP 7 ASAP. The new IntelliSense is worth the price of admission all by itself. While there were lots of sessions on Web services, COM++++, and .NET, that is definitely NOT what most people are dealing with on a daily basis. There is still plenty of need for, and interest in, stand-alone applications. I didn't go to many of the COM/NET sessions (not very applicable to what I do right now - and by next year it'll be called something else anyway ), but the ones I did see suffered from too much code and too few diagrams. Yes, it's impressive how few lines of code are required, but watching those lines typed in soon blurs into a mishmash of parens, dots, and quote marks. We desperately needed some diagram showing what component we're talking to, what we expect it to do for us, and what it needs from us in order to do it. Can you say "Visual"? Amazing to see how folks reacted to the disappearance of air travel. Ride pooling notices appeard on the BB, as attendees rented cars and planned to start driving home. Some folks asked me the best route to take out of San Diego. "Where are you headed?", I asked. "Kansas City" was the answer. The CodeMine framework folks were also headed out this morning by car, destination Bangor, Maine! The highlight for me was meeting so many of the faces behind the names on the ProFox forum and in the magazines. It's really great to have the opportunity to rub elbows with so many folks who a) are smart as hell, b) know and love FoxPro, and c) are true professionals. But it's still too expensive. Dan Covill Middleton Consulting Inc. dcovill@san.rr.com ---------------------------------------------------------------------- CODEMINE SAMPLE AVAILABLE by Dan Covill The CodeMine Framework folks gave me a trial copy to circulate among the members of our group. If you'd like to be the next to look at it (guess who's first? ), e-mail me so we can keep track of who's got it. Dan Covill dcovill@san.rr.com ---------------------------------------------------------------------- GETTING GOOD QUICKLY ACM UBIQUITY [From an ACM Ubiquity interview with John Parkinson, of Strategic and Corporate Development at Ernst & Young. ] PARKINSON: One problem .. is that there just aren't enough people who want to spend the time getting trained to learn the work well enough to excel at it. A lot of people nowadays believe that it should be possible to get good quickly, so that they can get happy or wealthy or whatever you want without any fuss or bother. And the idea that you have to go through an extended apprenticeship before you're certified to be a safe practitioner is increasingly difficult to sell to the kids coming out of school. --------------------------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 abergquis@cs.com Claude Nikula - Secretary 619-615-6318 crndev@home.com 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 ----------------------------------------------------------------------