VFUG January/February 1999 Newsletter
Ed. Spoke -- By Carl Warner
Visual FoxPro, Microsoft's Best Kept Secret -- By Les Pinter
Visual ProMatrix 6 -- By Tom O'Hare
VFUG NewsGroups Update -- By Ed.
Resources-- By Ed.
New VFUG Tech Support Layout -- By Tom O'Hare
DevCon News-- By Ed.
Tricks -- By Vladimir Zhuravlev
o Imitating a DriveList Class in VFP
Miscellaneous Tips -- By Anybody and Everybody
o ClassX Videos format revised and revised schedule published
o IE5 To Be Released
o Office 2000 Release Pushed Back
By Carl Warner
Congratulations to you if you're reading this far. You're reading a newsletter dedicated to the Rodney Dangerfield of database application builders. Of course, if you're reading this far you more than likely believe that FoxPro and Visual FoxPro are products that should be respected because they are more than worthy of respect. But, outsiders to the Fox community, even at Microsoft, still just don't get it. To others at MS, Access is the way to go until you hit the wall; then, SQL Server licenses is the final solution. Oh, then too, if you're a propellerhead, you can go ahead and use Visual BASIC to really get some work done. Visual FoxPro is always the red-headed stepchild.
Well, in this issue, please read Les Pinter's article on Fox. He has been an advocate of Fox app building for years and is definitely not thrilled with Microsoft's treatment of Fox. He has been doing a newsletter himself that is chock filled with usable code for as long as I can remember. Check out his web site to see and grab a sample of his bi-monthly newsletter dedicated to both Visual FoxPro and Visual BASIC in the database world.
Also, we have a bit of an unusual review of a product by Tom O'Hare. He has decided to jump into Visual ProMatrix and to share his thoughts with the VFUG membership.
We have an excellent trick/tip from Vlad, as well as a load of URL resources that I have compiled in my cruising the net. I hope these help you or even entertain you.
We are a slight bit short compared to other newsletters. So, again, I'm begging the membership to share their findings and their secrets with the membership either in the form of a full-fledged article or in the form of a concise tip that could save others time. Even if it's not quite complete and you've hit a mental block and have a partial solution, let's put it out there for others to brainstorm on. We made make lemonade from a lemon.
Resources: John Chambers, Public Relations Manager -- John@VFUG.Org Colin Keeler, Web Manager -- Colin@VFUG.Org Carl Warner, Marketing Manager -- Carl@VFUG.Org Arnon Gal-Oz, Technical Manager -- Arnon@VFUG.Org Tom OHare, Operations Manager -- Tom@VFUG.Org
THIS IS A REPRINT OF AN ARTICLE
BY: LES PINTER,
WHO GAVE US PERMISSION TO USE IT.
Microsoft' s Best-kept
By Les Pinter
Microsoft sells a fabulous tool for database development;
and if you bought Visual Studio, you already own it!
I've been developing database applications for more years than I care to admit. I've developed a successful consulting business and written six books and literally hundreds of articles about database development. I'm about to share my best database secret with you.
If you go to Microsoft's database seminars, those all-day sales presentations about how to use Microsoft products to build databases, you won't hear a word about FoxPro. I can't say why Microsoft doesn't mention FoxPro, but go to one and see for yourself. No F-word.
That's my secret: Microsoft Visual FoxPro, the best database development platform that Microsoft sells. I know that every programmer has a special place in his heart for the language he or she uses every day, and in the case of readers of this Journal, it's probably Visual Basic or Visual C++. But if you have Visual Studio, the first CD in the set has Visual FoxPro on it, so you already own it. You really, really owe it to yourself to install VFP and take it for a test drive.
FoxPro was born to do data. It contains dozens of little database functions that you'd have to write for yourself in VB or VC++, so you end up writing half the code, or less, than you would in VB. It's fast - and you don't know what fast means until you've seen FoxPro in action. And its native tables, far from being a drawback, are the key to building single workstation and small LAN applications without using a SQL server that adds cost and administrative complexity to your application. It can handle hundreds of thousands of records with no perceptible slowdown in performance; and beginners can be up and running in a fraction of the time it takes to become a good VB database programmer. It's easier to learn, simpler to code, and runs faster: What's not to like?
FoxPro is object-oriented. When you open up the form designer in VB, you have a palette of components that you can drag and drop onto the screen. In Visual FoxPro, you can replace the top dozen components textbox, commandbutton, listbox, and so forth with your own classes in less than 60 seconds. Thereafter, changing a property or behavior of any one of your classes - which takes only a few seconds - automatically flows through every single form in your application. You can do something similar in other languages, but you absolutely can't do it so quickly and easily.
FoxPro is robust. As a consultant to software developers, I've written applications for my clients that have gone on to become well-established commercial products, competing with programs written in VB, C and other languages. My clients can add features or fix bugs in a fraction of the time their competitors require, because FoxPro is so easy to use. It's easy to stay ahead of the market when your competition has to work twice as hard to write code to accomplish things that are simple in FoxPro.
FoxPro is flexible. You can build ActiveX Documents or OLE servers for environments where running an application continuously isn't desirable or practical. If your ISP doesn't want to be responsible for keeping your program running on their Internet site, write it as an OLE server. You can build COM objects for 3-tier applications, using HTML as your front-end and FoxPro tables or MS-SQL at the back end, and use MTS to manage your connections. Or use ODBC to talk directly to your DBF tables. You have just as many choices with FoxPro as with any other language, plus a few more that are faster and easier.
FoxPro is an ideal front-end for MS SQL or Oracle. It connects seamlessly to either, with no programming. That wasn't a misprint: No programming. FoxPro parameterized remote views can be designed to subset your data without a single line of specialized code. You won't find a better language for SQL server applications. However, before you commit to a server product that's licensed by the seat and requires a database administrator, consider using local tables and FoxPro. Given its speed, 90% of database applications can probably be run with local tables on single workstations or small LANs, where the FoxPro DBF format is just right. Gosh, Microsoft would lose a lot of MS-SQL sales if that were widely known...
All of these things sound great, but can they be proven? I wouldn't have it any other way. And you can prove it for yourself Go to www.lespinter.com and download the October issue of Les Pinter's Database Journal, which contains our "QuickStart tips and tricks for VB and VFP". Use the FoxPro articles to build your first VFP application. If you've already tried to build database applications in another language, you're in for a pleasant surprise. FoxPro development typically takes about half as long as it does in VB, and it's much easier to learn. Why doesn't Microsoft advertise it? Ask them. I'm sure there's a reason. But you don't have to take salespeoples' word for it. Try this simple test.
Take the FoxPro challenge
If your company is about to commit, say, a million dollars to develop a database application or a database product designed to run on single workstations or small LANs, set aside twenty thousand dollars for an experiment. If you can't afford to spend twenty grand to run this experiment, you probably can't afford the million dollars that the project will cost. And, if this little analysis ends up saving you half your budget. you can send me a thank-you note or half of the savings, whichever you prefer.
Here's what you do: Build a quick prototype of the application in both Visual FoxPro and your alternative database development language. Pick a small but representative part of the application, one that can be done in a week in FoxPro. If you don't have a FoxPro developer on staff, find a consultant who loves a challenge (hint <g>). Allocate two weeks - at least double the time - to do the same application in the other language. That's test number one.
Now, dump in, oh, say, a hundred thousand sample records whatever represents a year of data entry and try a few queries. Move around the data. Print some reports. Amazing, isn't it? That's test number two.
Now, make your choice of languages. You're done! Wasn't that fun?
I can't say why Microsoft doesn't include FoxPro in its database seminars. Perhaps it's a secret. Maybe it's hidden in this article, like an anagram. But you already own FoxPro, so give it a test drive. You'll be impressed.
Visual ProMatrix 6.0 at a Glance
By Tom OHare
VFUG Operations Manager
As a rule, we at the Virtual FoxPro User Group (VFUG) do not try to target specific products for articles. We try to avoid any possibilities that could lead to bias and conflicts of interest. But I believe 1999 provides us with a set of extraordinary circumstances namely the Year 2000 (Y2K) challenge. I see a real crunch put on programmers as the year progresses in order for businesses to be able to operate. Lets face it, midnight January 31, 1999 will be a "drop dead" date for many businesses period! So for this reason I decided to go against VFUG policy and write about a specific product. Please also note that this article is not an endorsement of Visual ProMatrix (VPM), nor is it meant to be a detailed analysis of VPM. This article is only intended to be an overview of the product especially as it pertains to the Y2K challenge.
Disclaimer number two, I am writing this on an airliner as I fly roundtrip to Berlin, Germany, from my home in Orlando, Florida, so I do not have access to all the resources I normally have. But I will do the best I can with what I have. Yes, I too am busy and this is the only time I can devote to writing this article. With that said for fairness sake, lets move on.
OK, enough of the disclaimers, lets get down to business. In my opinion VPM can best be described as an application generator (or a RAD tool). It consists of a set of development tools mainly in the form of builders and wizards. VPM is based on a very strong set of classes based off of the Visual FoxPro 6.0 base classes. But VPM takes this a little further by letting you modify their classes or better yet, make subclasses from their set of classes. Actually, as pointed out by the ProMatrix Corporation documentation, the second method, sub-classing, is the most desirable since you can stay compatible with future releases of VPM.
What Is VPM
VPM appears to be an application that is started directly by VFP (it is all really pretty transparent to the user). When you start VPM you actually start VFP which in turn starts VPM. You can easily go between VPM and VFP application development platforms. VFP 6 is required to be running in order to use VPM 6.
Beyond "just a Framework" VPM includes some features that are quite handy to have in case you need them. VPM can easily implement Audit Trails and Password Protection at various levels of your application schema. This is quite sophisticated and is a big plus to have available and easily implement. VPM also includes such utilities as a re-indexing scheme in case of corruption. VFP uses an advanced index scheme for its tables and rebuilding corrupted indexes cannot easily be done in VFP. This is mainly because of built in back links in the table headers to the owning DBC. So trying to re-index corrupted table indexes in VFP is not for the faint hearted and is better done by using utilities such as provided by VPM.
VPM is written using VFP commands and features. So when you are using VPM you are in effect using VFP. VPM is really a tool to automate standard VFP or VFP application routines and it even improves on some of the VFP native processes. The one thing that is noticeably missing is the VFP command window. But you can go right to VFP with just a few mouse clicks and get that old warm and fuzzy feeling back that the command window offers.
*** News Flash: According to the "Jungle Drums", the latest version reportedly will have a command window in it. See the Footnote below for more dtails.
At the heart of VPM is its sophisticated data dictionary. This is, in my opinion, the cornerstone of VPM. It appears that the rest of VPM is centered around the VPM data dictionary.
One of the coolest features of the data dictionary is the ability to enter field captions (what the user can understand) for a "base table" and have these captions be "brought forward" and used in Views based off of these "base tables". This is one feature that MS has not implemented in VFP and is a "real" time saver.
Yes, you will initially have to enter data is the data dictionary for each table you create in order to more efficiently use the power of VPM. Well actually you need to make the data dictionary before you can really use VPM at all. When you use the VPM builders, VPM uses the information in the data dictionary to create the objects you want. This may seem like a real time killer to have to do all this manual input of info such as captions, data rules and the normal data outline but it is just the opposite, it will pay off in time savings many times over later on as the development phase continues.
If you already have existing DBCs VPM will make use of the info already entered into them. VPM uses the native VFP DBCs to get info to do its job. This easy transition from an existing data source to a new framework (VPM) will be a real time saver. This means some of the work of building a new application will already be done if you have used native VFP tools such as the VFP Project Manager and the VFP DBCs from previous projects (applications).
With the release of VPM 6, VPM now fully supports Views. In previous versions you could use Views but to many users the effort required was not worth it. All of you experienced VFP developers should know just how powerful Views are. You novices are usually very leery of using Views and generally try to avoid them. This is a mistake -- dive in and get your feet wet. You will be better off if you get a little dirty and learn Views trust me on this. So with VPM 6 you now have the real power of Views available to you to take full advantage of. Matter of fact VPM 6 allows you to also index Views easily.
Yes, Views can be indexed and VPM 6 does a very good job of it. With View indexing you will loose a little time at runtime as the indexes are created the View is created but the speed advantage, among other operations such as sorting, will make up for this. Use the Views and index them if you will use them for any real data handling.
Both Local and Remote Views, are handled extremely well in VPM 6. Data connectivity for remote views is also handled well which makes linking Remote Views to different back ends relatively simple.
Yes, of course VPM automates form creation. This is essentially the biggest time killer and to me the biggest pain of creating applications form layout. You can burn up time laying out forms so they are both functional and eye catching (yes, we must keep the customer happy). VPM 6 does a decent job of form layout. Hey, lets be fair, no utility or form generator can read your mind and create "your" form exactly the way you want. So with basic form generation done by VPM it is easy for you to drag and drop fields or groups of fields exactly where you want them. When forms are created using VPM the field captions and field layout are there when you create the form.
Speaking of form layout VPM supports page frames. VPM has a page frame builder that does a good job of making page frames. Page frames can be a little tricky but VPM does a good job of overcoming some basic mistakes that especially VFP novices can make. Again, VPM is not perfect with the layout of fields in page frames but it does do the initial work and lets you easily clean it up to the way you want.
As a footnote, the "Form_Toolbar" class is the class you can use for most of VPM form creation. As a rule of thumb use the "Form_Toolbar" class as your base class for forms. You need to do this the old fashioned way by going to the top line menu in VFP and choosing "Options". On the dialogue choose the "Forms" tab and at the "Template classes" section check the "Form" box and then point to the "Form_Toolbar" class. This is a requirement in order to generate VPM forms.
VPM 6 has a number of not so surprising limitations. As a VFP programmer with a few years (and gray hairs) under his belt, I tend to do more of the advanced VFP type development. For those of you who have read my articles in the VFUG newsletters over the years you will get a glimpse of some of the advanced work I do such as Three Tier development and remote error handling. I could not find where VPM does any direct support of such advanced features as Three Tier Development, COM & DCOM (OLE Automation) development, MS Transaction Server Support or Web based support. But then again most VFP programmers I run into do not do this type of development anyway so for most "across the board" development VPM should be fine.
But I must admit after I did look a little deeper at VPM 6 my brain kicked into gear on how I might be able to tie into VPM code from some advanced coding. But as always my time is too limited to really look into it at any real extent. But as I said before, I did not see any direct support for these technologies but I do believe their framework is open enough to perhaps let you expand on what is already there.
As a note, the ProMatrix Corporation is promising a "Client/Server" version of VPM in the near future. It should be interesting to see this when it is released.
VPM has both online (standard help F1 key) documentation and manuals. I preferred the manuals to the online help as it was easier for me to find and fully reference what I wanted to know. It is the experience of many that books will always be preferred to a computer screen but in using VPM I just could not seem to solve the questions I had nearly as easily using just the online help.
VPM comes with a nice thick manual for standard documentation, a technical manual for looking deep into VPM and a Getting Started manual. It was strongly suggested to me to look over all of the manuals and then dive into actually using VPM. If nothing else, they said, I would know exactly where to look for help when I was actually using the product. I did this and yes it did seem to be the best way to attack VPM.
VPM also includes a sample application that is definitely worth running completely and looking at in detail. You will get a real feeling as to how VPM was designed to do and what it can do. So the Sample app to me was a necessity and well worth the detailed tour.
Support for VPM can be had through a number of options but in my opinion one of the best ways to get support is via the VPM newsgroup. VPM has their own newsgroup setup for registered users of VPM on the Internet. Not only can you get timely answers but you can also get the "hands on" experience from others who have most likely been in the same situation looking for the same answers you are. Not only can they give you input but can also offer a direction for you to proceed so you will not try to "fight" with the best ways of using VPM.
VPM also has telephone support and email support. Priority support is also available.
In summary, VPM is a good RAD tool for knocking out what I call "Standard Applications". OK, yes it can create powerful full featured apps for you but advanced features such as web support and three tier support are not directly there. But if you have to get that internal accounting app or employee info app knocked out VPM can do it easily. The users I talked to say they can crank out a good application in 50% or less time then it takes to do it from scratch using just VFP.
Yes, I did hit a few "Bug-a-boos" in VPM and especially one looping error with an empty table where I had to kill the app from the "Close Program" dialogue. With a tool such as VPM and the power it offers it is not surprising there are a few "gotchas" in it. But to me the few "gotchas" are just a minor inconvenience for the power VPM offers. I could easily overlook the few "bug-a-boos" for the overwhelming amount of good features VPM has.
At a recent local user group meeting it was suggested that if you start running into real problems trying to put an application together then you are fighting your RAD tool (no matter what flavor you use). If this happens they suggest you go back and look at examples and read the documentation again. Using RAD tools as suggested by the manufacturer, such as ProMatrix, should be fairly simple and straight forward.
The number one response I received from all the users I had talked to about ProMatrix 6 as to its real benefit is that "VPM is a good tool for knocking out applications quickly."
And of course as for the Y2K issue, VFP 6 now handles ambiguous dates with the "SET STRICTDATE" command. VFP 6 is of course focused on Y2K compliance and handles dates well. Since in essence VPM is an application written in VFP 6 then of course it inherits all of the functionality of VFP. Which means VPM handles Y2K as well as, if not better then, VFP 6 (VPM has added some internal code for date handling if you use their builders).
Just received from the ProMatrix Corporation:
We are releasing our VPM 5.1/6.0a Maintenance Update tomorrow. The VPM 6.0a update has
some valuable new functionality. Access to the VFP Command Window is now there. We have
also implemented a data-driven messaging system. A new Message Builder lets VPM users
access all form, wait window
and status bar messages in their applications. Users can modify the standard messages and create their own. At the appropriate spot, users can display messages by a simple call to a method in VPM's new message class.
The VPM 6.0a Maintenance Update is free to all VPM 5.1 and 6.0 users for download from the ProMatrix Web.
Also, we will be releasing VPM International this spring. VPM International is a VPM 6.0 plug in that will allow users to create applications that run in languages other than English. We will be providing templates for Spanish, German, Dutch, French and more.
ProMatrix Corporation -- http://www.ProMatrix.Com
Martin Schiff Custom Data Solutions -- http://www.cdsol.com/cds/home.htm
Virtual FoxPro User Group -- http://www.VFUG.Org
Microsoft Visual FoxPro 6.0 -- http://msdn.microsoft.com/vfoxpro/
VFUG NewsGroups Update
Try our new VFUG multi-lingual Newsgroup out.
For those of you using Microsoft News Readers try clicking on the link below. Yes it looks like a web URL but it is really a news group link. Just make sure you put it in the News Reader. If using another reader or have any problems you will have to manually enter the following info into your News Reader: contimail.continental.edu.pe
Anomaly Tracking System 2.0 (ATSWeb) Download Site
Visual FoxPro -- Future Directions-- Microsoft
Create Webtastic Data Apps with Visual FoxPro-- Tom Spitzer and John Glendening
EXITFOX.EXE -- Overcomes "Cannot Quit Visual FoxPro" Error
ADSIBROW.EXE -- Browses Active Directory with Visual FoxPro
VFP6INT.EXE -- Visual FoxPro 6 ODBC Driver FoxPro.int Resource File
Printing DOS-Style in FoxPro for Windows
Les Pinter's Database Journal-- November '98 Sample issue in PDF format (VFP and VB)
Classy Components Inc.-- Grab some VFP public domain software.
"Special Edition Using Visual Foxpro 6" by Menachem Bazian (ISBN: 0789718081)
SMARTCrypt ActiveX Security Control -- Wetstone Technologies Inc.
Y2K Compliance -- FoxPro Professional 2.6 DOS
Y2K Compliance -- Visual FoxPro Professional 3.0b Win
Y2K Compliance -- Visual FoxPro Professional 5.0 32-bit Win (English)
Y2K Compliance -- Visual FoxPro Professional 6.0 32-bit Win (English)
MS Certified Professional -- About the Case Study-Based Test Demo
Universal Data Access
Advanced ADO for VBA Programmers
Microsoft Office Cross-Application Programming
Understanding Object Models
Wotsit's Format-- The Programmer's Resource
Xara3D -- 3D text headings for use on Web pages
New VFUG Tech Support Layout
By Tom O'Hare
If all goes well, on March 1st VFUG will re-arrange it's Browser Based
Support area. The changes will mainly be that instead of one Browser area
there will be 4:
OLE, COM & DCOM
The current area will be turned into a read only archive.
The reason for this change is the unexpected number of messages and the
slowness of MS FrontPage98 to update the server with new input. It is
getting very slow to both post messages and to archive them.
VFUG Operations Manager
It'll be the 10th anniversary of the FoxPro DevCon. And, to differentiate this one from recent ones, it'll be not just three days of intensive sessions dedicated to MS technologies, including Visual FoxPro, but four days of exhausting sessions. It begins Sunday evening, June 6th and goes right on through Thursday afternoon, June 10th. You'll have to get your room reservations and airline reservations in as early as possible or you could be left out. The conference is being held at the very nice La Quinta resort in Palm Springs, California. That location and its accomodations should add to the occasion.
All of the current information (no session list yet) is at the Advisor
By Vladimir Zhuravlev
I created some simple code to imitate a drivelist class in VFP.
If in an init event of the combo with style dropdownlist, put the following code:
DECLARE SHORT GetDriveType in kernel32.dll STRING @lpR
for i=65 to 90
if GetDriveType(@dr)!=1 and GetDriveType(@dr)!=0
The combo will show the list of all drives available.
It was possible to do this in old FOX for free with adir function,
in VFP this function gives nothing for code adir(avol,'C:\','')
From: Vladimir Zhuravlev firstname.lastname@example.org
By Anybody and Everybody
ClassX Videos that were announced here in an earlier newsletter are finally getting finished in a new easier to view format. For those of you who ordered and viewed the first video in a long series, you know that the video was long on content, but fell short in the delivery area somewhat. Ken Levy says those presentation issues have now been addressed. See http://www.ClassX.com/ .
The final release of Internet Explorer 5 and Internet Tools arrives on March 18th, 1999!
The release of Office 2000 has been pushed back until June, 1999. No word on when Service Pack 1 will follow that June release.
Get into the loop and chat away. OK?
Some final comments....
For more information on scheduled chat sessions here at VFUG, contact John@VFUG.Org or check the VFUG newsgroup out for current info.
Want to be (in)famous? All you have to do is send VFUG an article or otherwise useful piece of content. We'd be happy to publish most Fox related tidbits, and you can help your fellow developers worldwide!
VFUG is also always looking for additions to our Vendor program. Would your company be interested? Contact Carl@VFUG.Org to get with it.
Has your local User Group thought about VFUG affiliation? Find out more!
| Virtual FoxPro
Copyright © 1999, Virtual FoxPro User Group, Orlando (Florida), All Rig