
Editor.rpt --
Barbara Paltiel![]()
VFUG Update --
By the VFUG Board Members
Microsoft
News -- By Milind Lele and others
All About Servoy
-- By Carla Benassi
Windows Explorer Tweaks
-- By Barbara Paltiel
Alternate Means of “Data
Compression” Part 1 of 6 -- By Tom O'Hare
Alternate Means of “Data Compression” Part 2 of 6 -- By
Tom O'Hare
Alternate Means of “Data Compression” Part 3 of 6 -- By
Tom O'Hare
Web Tools Useful for Web Development -- By
Farhad Bayanati
MS SQL Server Common Table Expressions & Recursive Queries -- By
Farhad Bayanati
AdventureWorks sample database for SQL server 2005 Express -- By
Farhad Bayanati
FTP Protocol Reference
-- By Tom O'Hare
What's
New for Spanish VFUG Members -- By Isaac Venegas
Resources
for German VFUG Members -- By Rainer Becker
Conferences
-- By
Resources--
By the Editor and Other Contributors
o Visual FoxPro
o Non-VFP
Software and Programming
o Hardware and
Operating Systems
o Web Services,
XML, HTML and Other Internet Items
o General
Interest
![]()
We are sorry to tell you all that John Chambers, one of the original Board of Directors at VFUG passed away mid-December 2008 after a massive heart attack. John will be greatly missed by everyone on the VFUG staff. Many of you knew John through the Thursday online chats he moderated for many years. Those in the Houston TX area knew him through the local VFP user group meetings. John was a licensed psychologist and his main work was counseling. Many of us (including myself) benefited from his wise and compassionate advice. He was always ready to help whether you needed advice on getting your life back on track after a major catastrophe or a quick joke to cheer you up when something minor went wrong. He will be sorely missed by his family in Texas and Australia and by all his friends in both the brick & mortar and the virtual worlds.
Carl Warner, one of the founding members of VFUG and the editor of the newsletter before me has left the VFUG Board of Directors. We'll miss Carl's knowledge and wry humor, although we still see him on our ListServe occasionally and he's still good about sending me technical information.
Barbara Paltiel
![]()
My husband asked if I'd like a Kindle(R) for my birthday.
"You read so much, this would really be convenient. Just load up the books and read it anywhere."
Well, yes I DO read a lot - it's my favorite escape from reality. But he doesn't really see WHAT I read. Right now I'm working through several series of mystery novels, each series written over 15+ years, plus some Science Fiction and the stack of programming magazines and books that grows taller each year. I made a list of 15 books I'd read recently plus 2 magazines and 2 books on .NET and SQL Server that I bought this year and started checking eBook lists. 5 of the novels were available and one of the programming books. Total cost (not including $360 US for the Kindle) was $ 67. I paid $ $78 for the two computing books, and the rest were either free magazines or from my statewide library system, where the highest charge is $.75 (US) for sending a book to my local library from a different area.
Fiction books seem to be in the $4 - $10 US range. This would soon become prohibitively expensive with my 5-book per week habit. (Is it any wonder I love the local libraries?). And besides, I read outdoors, in the car (no,NOT while driving) and in the bathtub. Wonder what bubble bath would do to the Kindle? And what about the early books in those series I mentioned? None of the books published before 2000 were listed on the Kindle list, but the library has them all. Not only is it not economically feasible, it wouldn't even make my life simpler.
Why am I talking about my presents? Actually I'm talking about taking a good look at the 'next best thing'. However fun and shiny and NEW it is, however much the TV or email ads say it is the ultimate, necessary item, will it actually save you time? Money? Will it make your life better? Easier? Whether it's a Kindle for Christmas, a new phone with bells and whistles you'll never use or a super computer your Mom will only use for email and her solitaire game, is it worth the money? If you like war games, then buy the best game system you can afford. If text messaging is keeping your business alive buy a better PDA/phone. But does your company need faster computers? Or will a memory upgrade solve the immediate problems for 5% of the cost?
I rarely use my cell phone - most of my calls are to/from my husband so we won't waste minutes calling our home line. I bought my basic model because it had a screen my bad eyes could see and it would accept voice commands. I'll keep using it until the last of my 3 batteries dies, since I can no longer buy them. My husband, on the other hand, is permanently linked to his Bluetooth. His phone does everything except drive the car for him, and is worth every penny we spent. But his new computer just does email and documents, and stores a million document images. No fancy graphics, just storage and quick retrieval. It cost half what mine did and does just what he wants. My workstation, network server and web server are top-line, crammed with internal and external drives, hedged round with top-level AV and firewalls, with all the memory I could fit into it, but they'd all be lousy at online games - I'd rather read.
So, no Kindle for me. Instead we bought a solar powered fountain for my rose garden. I used to have a fountain at a previous house with a willow tree and a resident green frog. The frog was about 1 in (2.54 cm) long, but had a voice you could hear for a city block. Anyone have a frog who will need a good home? I've already planted a corkscrew willow and the plumbing and solar power are working fine. I'm hoping it will be a "Field of Dreams" situation. Build the fountain and the frog(s) will come.
And finally, checkout our lead article on Servoy. I've been to several of their webinars plus an all-day training session, and can vouch for Servoy's rapid development tools and interoperability.
Barbara Paltiel, Editor VFUG Newsletter
![]()
If you can't remember your password, send an email to barbara@vfug.org giving your original email if you know it, your full name (first and last) and any other pertinent information like company, country, city, etc. I'll try to find you in the membership list and email you back. This may take a day or two - I DO have to work for a living. If you're named Steve Smith or Alberto Rodriguez or any other fairly common name (we have 5 of each) give me as much information as you can. I will NOT send a login to anyone unless I'm sure it's the right person.
![]()
Have you noticed how many of the tips come from ListSever messages? Join the ListServe and see what else you're missing. Just send a message to VFUGListServer@VFUG.Org with the message SUBSCRIBE
-- Barbara
As we are a free service to you, the membership, we thank the supporters of VFUG who have placed paid banner ads on our opening page. They help defray the costs of running the server for this site and give their products and services some well deserved exposure. Be sure to check out their offerings as you may be surprised how much their latest versions can help you.
|
|
VFP Vendor |
Product or Service |
|
|
Foxfire! Report Writer and Consulting Services |
|
||
|
|
|
||
|
Java Application Framework
|
![]()
|
At the VFUG Web Site: |
|||
| VFUG Home | Chat | Real-time online chatting at least every week, usually on Thursday at 3pm EST, 2pm CST, etc. Topics are sometimes announced but are open. | |
| File Archive | Fox-related files, utilities, & newsletter downloadables. | ||
| Lectures | Online lectures, presentations, conferences. | Support | Use the VFUG Forum to post questions and supply answers to anything that is FoxPro-related. Categories are clearly shown. |
| Knowledge Base | Knowledge Base from our members. | ||
| Vendor List | List of current and past Vendors of the Month. | FAQ | Frequently Asked Questions (FAQs) for the Fox community. |
| VFP Resource Center | Tutorials are underway for beginners to MS Visual FoxPro. | ||
| Newsletters | This area allows you to view all VFUG newsletters. | Links | This is an area that is constantly under construction as new web links of interest to the Fox community are posted. |
| Case Studies | Case studies from our members. | ||
| Job Bank | Job opportunities and jobs wanted postings. | Members | This area is where you can view the latest additions to the VFUG community as well as update your vital statistics including mailings. |
VFUG Officers:
| # | Name | VFUG Function | E-Mail Address |
| 1. | Colin Keeler | Web Manager | Colin@VFUG.Org |
| 2. | Arnon Rotem-Gal-Oz | Technical Manager | Arnon@VFUG.Org |
| 3. | Tom O'Hare | Operations Manager | Tom@VFUG.Org |
| 4. | Barbara Paltiel | Newsletter Editor | Barbara@VFUG.Org |
![]()
By the VFUG Board Members
Don't forget this newsletter is always available on line. In fact I post it as I put it together so you'll see an 'Under Construction' note on the link and the file downloads will probably say 'file not found' However it's a LOT easier to read in HTML, and all files to download are just a quick link away. It's a lot prettier and easier to read in HTML - we use a lot of colors and you can jump from any entry in the Table of Contents to the actual article or tip. And finally you can search the text of the online newsletters for any word or phrase. You can read it there or download the text version in a ZIP file.
Thanks!
![]()
Milind Lele and Others
Latest News on Visual Foxpro - Security updates for ActiveX controls for VFP8 and VFP9. Don't forget to upgrade to VFP9 SP2!
Visual FoxPro 9.0 SP2 Sedna is now available for download on MSDN.
Sedna is a collection of libraries, samples and add-ons to Visual FoxPro 9.0 SP2. It contains six components: VistaDialogs4COM, Upsizing Wizard, Data Explorer, NET4COM and MY for VFP and DDEX for VFP. For more information about how to get started with these please refer to the readme that accompanies the download.
The download of Sedna also include full source code. Sedna is licensed to be modified and distributed free of cost, subject to the terms mentioned in the license agreement displayed by Sedna setup.
Early in 2007 we had announced that Sedna and its components will be published on CodePlex under VFPx as shared source. This will be available shortly. Stay tuned for further announcements on the VFPx site.
The new MSDN Forums allows you to search a growing archive of technical questions and answers. If an answer can’t be found in search, you can ask a new question, be notified when there are replies, and mark the appropriate reply as an answer. The VFP team had a Visual FoxPro General forum added for technical questions and discussions about developing with Visual FoxPro 9.0 - including language, IDE, designers, data, .NET interoperability, and more. For more information, refer to Welcome to the MSDN Forums. While this will assist some VFP developers in seeking assistance in finding answers to their technical questions, great support still exists and is often recommended on various third party Visual FoxPro Community web sites.
![]()
Carla Benassi
Customers’ Quotes:
Michael Sedita, President of MS Health Software Corporation
"We have been developing FoxPro apps from very early on and when we realized that FoxPro was coming to an end and we were looking to develop an alternative and a web-based, app, we looked at a bunch of tools and we came across Servoy and it has been working very well for us"
"We mainly had one app, wanted to add functionality, enhance it knowing that FoxPro was going to come to an end anyway. Put time and money in a tool that's going to be around for a long time"
"We also looked at the total cost -- Servoy turns out to be lowering our costs (TCO)"
"We didn't look too much around because Servoy was such a good fit" "We found .Net to be too complex for our environment"
"I haven't hit any wall with Servoy"
Jeroen de Vries, CEO of Softwear
"We make vertical market products for the fashion industry - started all in FoxPro about 20 years ago. Then we started hosting our own apps over the Internet, now 90% of our customers (over 2000 users) use the app on-line (120 servers to maintain the performance!). Scalability was a problem then - so that's why we started looking for a better platform, and Servoy was the best
kid on the block. We've been redeveloping for about a year now - it's a huge app but the productivity we're seeing with Servoy has amazed us. We'll be saving huge in licensing cost by eliminating the need for Terminal Services". Another important item for us is the increase of popularity of the Apple platform. With Servoy we can seamlessly support Windows and Mac from the same codebase."
Lambert Willemsen, CEO of Infogroen
"We have been developing in FoxPro for a very long time. Through the years our apps have grown, that's why we're working in an ISV program with Servoy to develop a framework where we can put all of our apps in one coherent data model"
"We started evaluating in 2008; looked at .Net but after some discussion, we ended up with Servoy - mainly for the freedom, independency"
"I was new to JavaScript, but I found it very easy and similar to the FoxPro language programming"
Servoy: a dream come true for FoxPro developers?
FoxPro ISVs today are facing a dilemma. Microsoft recently announced that it will not release any new versions of its Visual FoxPro development software after Version 9.0. Many FoxPro ISVs, as well as professional software developers, are considering .NET for building business applications. However .NET is a very different beast than FoxPro, very difficult to learn and it takes much more time to build, maintain and deploy applications.
Because of this, more and more FoxPro developers are investigating what their other options are and quite a few of them have put Servoy on their shortlist. In this article you will learn why. First we will discuss the similarities between Servoy and FoxPro, and then we’ll have a look at the differences.
Servoy is a development and deployment environment that enables you to develop applications in a very similar way to FoxPro. Check out our FoxPro landing page: www.servoy.com/foxpro.
Similarities between FoxPro and Servoy:
1. Easy to learn: For a FoxPro developer, Servoy can be learned in about a week. Typically, FoxPro developers will be up and running in about a week and proficient in the first month of using the product. Servoy provides both in-person training, webinars and extensive documentation and examples.2. Faster development: FoxPro developers that have switched to Servoy say that their productivity increases in the Servoy environment.
3. Good Windows citizen: Just like FoxPro, Servoy is a good Windows citizen. It runs on all version of Windows (Windows 98, Windows ME, Windows XP, Windows Vista, Windows 7, Windows 2000, Windows 2003, Windows 2008) and integrates very well with both the operating system (among others has native look and feel on all versions of Windows), the file system and other Microsoft applications. With easy to use plug-ins, direct connectivity is available to Microsoft Excel, Microsoft Word, Outlook and Exchange. Additionally, Servoy also integrates well with any other Windows executable, DLL or ActiveX component.
4. Object and data oriented: Similar to FoxPro, Servoy has a very nice mix between pure Object Orientation and relational data orientation. On one hand, you can use inheritance on objects and on the other hand you have direct access to data objects to make viewing, searching and editing of data very easy and transparent.
5. Very fast database: Out of the box, Servoy ships with Sybase’s iAnywhere database. This database is as fast and, in many situations, faster than FoxPro’s data engine. Additionally, Servoy can connect to any SQL database, including MySQL, Microsoft SQL Server, Oracle, IBM DB/2 and PostgreSQL. You can even connect to multiple databases at once and combine data from different databases on the same screen.
Servoy also has a native FoxPro connector that allows developers to connect directly (and with high performance) to existing FoxPro data files (read and write!).
6. Very complete set of UI widgets: Servoy has a very complete set of User Interface components. From text fields to date picker, pull-downs, type-aheads, multi-line fields, grid controls, image support -- it’s all standard and easy to use and adjust.
7. Easy to integrate with hardware and other software: Because Servoy runs as a native application on Windows, it can easily integrate with hardware connected to a PC and also with software already running on the system.
8. Stand alone, networked, over the internet: Applications developed in Servoy can be deployed as a stand alone application, a networked application using an N-tier Client Server model and also over the internet -- all from the same code-base. With Servoy, there is no need to write different types of applications.
9. Small and large apps, as function rich as FoxPro: Servoy can be used both to develop small applications with only a few screens or full-blown ERP applications with thousands of screens and many hundred thousands of lines of code.
Differences between FoxPro and Servoy
1. Windows AND Web Client from same code base: Applications developed in Servoy cannot only be deployed as native applications with a native Windows User Interface, but can also be deployed as browser applications. When deployed to a browser, Servoy uses pure HTML that runs in all popular web browsers including Internet Explorer, FireFox, Safari and Google Chrome. To run an application in the browser, there is no need to write any HTML -- Servoy does this out of the box for you.
2. Cross database (Oracle, MS SQL, MySQL, Sybase): Applications developed in Servoy can be deployed to any modern SQL database and you can even switch between database vendors. For example, you can write your application on MS SQL server and deploy it on Oracle.
3. Cross platform: Servoy applications are cross platform out of the box. You can run applications on Windows, but without any changes, you can run that same application on Linux and Mac as well. Both the server, the smart client and the web client are cross platform. With the increasing popularity of Linux and Mac, this is an important feature.
4. No 2GB limit: Unlike FoxPro, Servoy does not have a 2GB table limit. Your tables can be as large as you want them to be.
5. No limit in scale, 64-bit: Servoy applications can run stand alone with a single user or with hundreds of thousands of users -- all from the same code base. Servoy supports both 32 and 64 bit architectures and can be scaled vertically (using a bigger server) and also horizontally (by clustering multiple servers). Additionally, Servoy has built-in support to run on cloud computing infrastructures like Amazon’s Elastic Cloud.
6. Zero deployment: Servoy’s Smart Client is zero deployment. This means you don’t have to install anything on the user’s computer. To launch the application for the first time, simply click a link and the application launches, downloads its components (usually 2-4 MB) directly from the Servoy server and saves this in a local cache. This eliminates the deployment problems with classic software where software has to be rolled out to desktops.
7. SaaS enabled: Servoy’s platform is SaaS enabled out of the box and provides built-in functions for multi-tenancy. Both on the application layer, the data layer and the reporting layer making it very easy to start offering your software as a service to your users.
8. Native client with no need for Citrix or MS TS: Servoy's smart client does not need Citrix or Microsoft Terminal Services to be deployed over the internet. Even though it has a native user interface, it is still fast over the internet without the need of additional software, thus saving licensing costs.
9. Standards Based: Unlike FoxPro, Servoy does not have a proprietary language or database. This makes acceptance, in particular with larger organizations, much easier.
10. Servoy is three-tiered: Servoy has a three-tiered architecture, this means that clients do not connect straight to the database but through an application server. This reduces load on the database server, reduces network traffic, increases security and makes applications faster and easier to program and maintain.
11. Smart, Web, runtime, disconnected: From a single code base, Servoy can be deployed in different ways to address different needs.
**Two ways to learn more!**
Servoy to sponsor SouthWest Fox Conference: Oct. 15-18 in Mesa, AZ
For the third year in a row, Servoy will be a Gold Sponsor and Exhibitor at
Southwest Fox -- the annual conference hosted for FoxPro users. Developers
who have used FoxPro in the past are finding that they love Servoy. Microsoft
has announced that they will no longer be revving this popular 4GL tool and
will stop support for the product entirely in 2015. As a result, many FoxPro
users are looking for the "next step" -- and Servoy is a great alternative.
For more information about the SouthWest Fox conference, please visit: www.swfox.net/.
Special Webinar: Servoy for FoxPro ISVs (Post SouthWest Fox Conference) – Thursday, October 22 @ 10am PT/1pm ET
Please join Jan Aleman, Servoy CEO, in this comprehensive one hour webinar,
where we’ll talk about the similarities and differences between FoxPro and
Servoy and we’ll answer all your questions. To check out the FoxPro landing
page on the Servoy website, click here: www.servoy.com/foxpro
The Servoy Special Webinar is FREE, but seating is limited. To
pre-register today, click here: https://www1.gotomeeting.com/register/832062225
![]()
By Barbara Paltiel
Windows Explorer opens by default to "My Documents". Many people prefer this, particularly people whose work falls into a single category and who want all their letters in a single folder or group of folders. However many of us work on multiple projects and for multiple clients. Each project may contain code, letters, graphics etc. and each needs to be separate from the others. Personally, I often have 2 or 3 projects open at the same time as I juggle work for one with phone calls from another client and emails from a third, so I'm switching back and forth from folder to folder and from drive to drive. I've found that having several Explorer icons, each opening in a different area can save me a lot of annoyance. Maybe only a few seconds of real time saved but the end effect is a smoother work day.
Open Explorer in a particular drive or folder
Open the Properties form for Explorer (right click on the icon, choose Properties) and replace the default target of %SystemRoot%\explorer.exe with %SystemRoot%\explorer.exe /n, /e, d:\workfolder where d:\workfolder is the drive and folder you where you want Explorer to start.
Close the folder tree
The default is to open the folders under the chosen folder. If you don't want this, add /select to the command
%SystemRoot%\explorer.exe /n, /e, /select, d:\workfolder
Add items to the Send To menu for XP
There are a lot of text files I want to open with Notepad. Various log files. VFP config files, not all of which have fpw extensions (I use different extensions for development and compiled applications, often in the same folder) and many others.
Add Open With Notepad to Vista Explorer
This is similar to the previous item, but adds a menu choice to the right-click menu rather than to the Send To menu. It's a registry hack - all caveats about changing the registry apply! (Don't forget to BACK UP the registry before you make any changes!!)
Explorer icons in Vista
In theory, in Vista Explorer displays different icons and views for different files. If your folder is MP3s you see track, album etc. information. If it contains spreadsheets or PDFs you'll see size, date changed, etc. Unfortunately, Explorer doesn't always get it right and you may find it trying to find album names for your DOC files and image size for you MP3s. It seems that Explorer uses templates to match file type and display but there's a bug in the process that saves your choices. Annoyances.org has registry fix for this. Go to http://www.annoyances.org/exec/show/choosetemplate and download ResetExplorer.exe and ChooseTemplate.reg. Double click ResetExplorer.exe and click Yes to clear Explorer's cached data. Then double click the REG file to add a new choice to the Tools/Folder Options/View menu: Default Folder Template. You can use the defaults designed by Annoyances.org or you can design your own on a folder by folder basis. Either way, Explorer won't lose your choice.
Skip the "Open with web service" prompt
When you try to open a file type not listed in Explorer's memory you're first prompted to choose a web service. Since this isn't applicable in most cases, you can skip this with a minor registry tweak
User Key: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]
System Key: [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer]
Value Name: InternetOpenWith
Data Type: REG_DWORD (DWORD Value)
Value Data: (0 = hide web service, 1 = display web-service (default)
Disable ZIP Handling in Vista
Most of the time the built-in ZIP create/browse/extract capabilities of Vista Explorer are useful. But if you use ZIP files for backups as I do Vista will come to a screeching halt if you click on one of these humungous ZIP files. In fact, Vista will try to recurse the various folders in a ZIP file even if you haven't clicked on it - just so it's there if you ever want it. Of course, that'll bring everything you're trying to do to screeching halt. If you use WinZip or another ZIP program as I do (my favorite is 7-zip) you can disable this aspect of Explorer. To do this, you'll need to download another utility, ShellExView from Nirsoft.net, a Shell Extensions Manager.
Open up ShellEx in Administrator mode by right-clicking the file and choosing "Run as Administrator". Select all of the "Compressed" items, right-click and select "Disable Selected Items". Then log off and on again or use Task Manager to exit and restart Explorer.
Answer "No to All" when copying files in Windows XP with Shift + No
If you were working in Windows Vista, Windows 7, or Mac OS X, you could easily tell the operating system not to replace the duplicate file and to apply that action to all the other duplicates. Windows XP however, doesn’t give you a “No to All” or “Apply to All” option, just a “Yes to All”, which would replace all the duplicate files and isn’t the action we want.
Hold down the Shift key when you click the No button. This will produce a
“No to All” effect. Why Microsoft didn’t include a “No to All” or “Apply to
All” option in Windows XP is beyond me, but at least this simple trick works.
![]()
Alternate Means of “Data Compression” Part 1 of 6
Part I: Overview
Tom O'Hare
Introduction
“Data Compression” in very general terms means reducing the size of data to
a fraction of its original size so it can be handled with more efficiency
and is easier to interface with. There are numerous ways to physically “compress”
data, but there are also alternate ways to decrease the physical size of data.
This paper will deal with alternate means of compression, or the limiting
of data to a more manageable size.
In any collection of data there are at least two constants; Time and Change. Time is a quantity that is totally dependent on the type of data being collected; using measurements such as hours, minutes or seconds. Change (which we will call “Delta”) is when data moves beyond its present value to a new or different value.
Both of these constants are fully dependent upon the type of data being collected. As an example, monitoring of jet engines in prototyping requires a constant stream of data for a constant amount of time and every change that occurs no matter how small. This is called critical or “mission critical” data collection as jet engines must be 100% proficient. Any variation of data, even for a millisecond, must be noted and logged. The airframe the jet engine is connected to is not as mission critical as an engine. It is a more “static” environment so data collection can be only “samplings” of data that change over time.
The premise of this paper is not to show mathematical algorithms of creating tokens to represent data in a compressed state, but rather to control or throttle the amount of data being collected and then how to effectively use that data “subset”.
Since this paper is dealing mainly with raw Data, Time and Delta, the data can remain in a more “human readable” form as when it was captured or stored.
Both the math compression scenario and the alternate methods described here require a processing or manipulating of data. No matter what kind of compression schema you eventually decide to use there is always overhead associated with it.
Time
Time as a quantity is dependent upon the object which the data is being
collected for. In other words, time segments are set by the environment in
which the data collection takes place. Obviously dependent on the type of
data being collected, the length or quantity of time slices used will then
be chosen.
In this scenario, only changes in a quantity of time produce a capture of data for that particular moment. The use of Time as a data capture method does not require any knowledge of the value or Delta being recorded. Data capture is purely on a preset timed interval.
Delta
Delta in scientific terms means “change”, or when a known quantity changes
in value. In this alternate method of data compression the amount of change,
or Delta, is also dependent upon the type of object that data is being collected
for. In this method, defined limits of known values and changes at or beyond
these limits are then recorded. When this change occurs, the apparatus doing
the data capture must then adjust to the new value and set or reset new limits
dependent on the newest value recorded.
Delta can also be a singular method of data collection. In this pure scenario Time is not a dependent value, only Delta. This means only occurrences of Delta are recorded and these recordings are not influenced in any way by Time.
Time and Delta
The most secure or robust way of capturing data is by combining the Time and
Delta methods. In this approach you will always have a second parameter to
rely on in the data capture mechanism. You will maintain a better scope of
what is going on because you can compare Time and Delta data captures against
each other. This combination of Time and Delta always gives you a better point
of reference because you can more easily cross reference both Time and Delta
values to derive a particular or desired data point.
In effect, by using a Time and Delta approach you can create an “X” and “Y” axis graph point approach. The “X” axis is a time line and the “Y” axis is the plus and minus limits of a current value. By plotting the X and Y values (Time and Delta) you maintain a very reliable method of capturing data for detailed data analysis later on.
The “compression” used in this case is caused by not capturing un-needed data. The point is; “why capture data that remains at the same value during a specified period of time?” We already know what that value is and we already know what the time intervals are. We can verify that value, especially with the X axis (Time), as “insurance” in case for any reason there is a problem with monitoring the actual Deltas.
Collecting data using these Time and Delta capture techniques, we have in effect eliminated much of the data “bloat” and reduced the amount of processing needed for later data analyses.
Copyright© 2004, Thomas O’Hare – All Rights Reserved.
Thomas O'Hare
![]()
Alternate Means of “Data Compression” Part 2 of 6
Part II: Initial Data Streams
Tom O'Hare
Overview
All data is generated in some sort of “data stream”. The frequency and amount
of data in that stream is dependent on the source generating the data and
the mechanism used to capture the data stream. Since this series of papers
deals with alternate types of data compression we will assume that at least
a fair amount of data is being generated at some sort of regular intervals.
In this paper we will be dealing only with the “raw data” or what we will term the “Initial Data Stream”. We will show how this “raw data stream” can best be used and it’s interaction with alternate means of data compression.
The Concept
As with any type of data compression, you first need a set of data or a
“data set” to work with. In this paper we are dealing more with “data streams”
or data in a more “dynamic” fashion as opposed to “static data” or data
we know will not change. Since the data is dynamic we can count on it changing
at any time so we must keep this fact in the fore front of our schema at
all times.
If you use this “stateless” concept as a key element in all data handling operations, you will be able to handle data whenever it changes and realize true data integrity.
The Initial Handling
Since data is in a raw streaming state we will first need to initially “capture”
or “buffer” the data. There will be two types of buffers we will talk about
here but the second type is the one we will focus on.
The initial buffer is raw data as it is arrives. We first need to capture this data until we know we have a complete data set and feel reasonably certain that the data is not corrupted in any way. Data must remain in the initial buffer until we are reasonably sure we have data integrity. Data must be checked here for any obvious data corruption that may have occurred in the capture process. These mechanisms are local and specific to the apparatus doing the initial data capture or buffering.
Once we are reasonably sure data is complete and intact, we can then pass this data to a secondary buffer. The secondary buffer is a means of semi-permanent storage, e.g.: written to a file on a computer disk drive. Once the data is stored it is now accessible for manipulation at any point in time. Data can be read immediately from this secondary type of buffer, or stored until an external mechanism is ready to use this data.
The Mechanism
The best kind of secondary or semi-permanent data storage for this type
of data is what is commonly referred to as a “data base”. A database is
a file that contains data that can be referenced easily by an external entity.
A “flat file” database, such as a pure text file, is good storage but not
very efficient. Other types of data storage utilize advanced mechanisms
such as “data indexing”. When data is indexed in a file, it is much like
the index at the beginning of a book that you read. In the beginning of
a book there is a recognizable name, the way by which something is classified,
and the location or page number where the information can be found. Indexing
of a database is much like the same apparatus used in a book. We just merely
make it easier and faster to find particular subject matter, or the exact
location of the data we want that is stored in the file.
With this way of referencing or indexing data, we can easily do other operations such as sorting, check for duplicate values or find a particular piece of data in a very large file extremely fast.
If we now use a database as a secondary or “main buffer”, we will have data written to a semi-permanent storage area that can be accessed very quickly. In stateless or dynamic environments, it is only this data in the main storage buffer that we can be relatively sure is complete, has integrity, and is somewhat static in nature
Conclusion
By using a database as a secondary or main buffer we have a very fast, relatively
safe and very efficient means of storing data for any period of time. By
using this database as a buffer for our alternate means of data compression,
we have a very stable working environment for future operations.
Since the data is buffered for any period of time we deem necessary, we now also have a means by which we can perform data “auditing”. In other words, we can use data from this buffer in future operations and still be able to reference this data to be sure other operations have completed to our satisfaction.
Once data has been successfully used in other operations it can easily be “deleted”, or the data space can be “recycled” to make room for any new incoming data.
If we constantly recycle existing data space in a continuous read/write cycle we have achieved true “data buffering” in a very safe and efficient means. This database, or main data buffer, is now the cornerstone of our means of alternate data compression.
Copyright© 2004, Thomas O’Hare – All Rights Reserved.
Thomas O'Hare
![]()
Alternate Means of “Data Compression” Part 3 of 6
Part III: Secondary Data Streams
Tom O'Hare
Overview
The “Secondary Data Streams” we refer to in this document are the streams
we are most interested in. These secondary streams are the streams of data
we create via our own mechanism. These secondary streams are what we consider
to be our “compressed” data for our alternate means of data compression.
Creating the Secondary Data Stream
The creation of the secondary data stream is done via an external source.
This is usually a stand alone application that is responsible for finding
only the data it deems necessary in creating the data mandatory for our
needs.
In part two of this paper we talked about the concept of buffering the initial data stream using a database as a type of buffer. This buffer is what is used as the source in the creation of the secondary data stream. The secondary stream is actually just a very limited extraction or sub-set of the main “data buffer” or database.
Data Stream Expanse
The physical expanse of the primary and secondary data streams can be just
a local “side by side” arrangement or they can be over any distance. The
only requirement is that these streams have a well defined starting and
ending point. Several simultaneous streams could even exist if necessary
as long as these starting and ending points are easily accessible and defined.
Data Stream Connections
A constant connection or constant data stream is not mandatory. These streams
can be created only as deemed necessary by the external control source.
This point is enforced by our use of our primary buffer as outlined in part
two of this series. This can allow for the use of such mechanisms as dial
up networks (DUN), or even for communication interruptions such as Internet
router failures. At any point a connection can be restored and the primary
data buffer accessed. At that point the secondary data stream could then
be created or updated.
The sources or physical locations of data streams can also change. As long as some mechanism exists to point our external mechanism to the initial data buffers physical location, then we can create data streams. This can best be demonstrated by the use of the Internet. As long as a fully qualified domain name or an IP address is supplied to the external mechanism that creates the secondary data stream, then the secondary data stream can exist.
Data Stream Characteristics
The characteristics of the secondary data stream can best be summed up as
“an external and complimentary entity that has no direct influence on, nor
creates any dependencies on the primary data source”. In other words, the
secondary stream is a totally distinct and separate process from the initial
data streams or buffers. The initial data stream, buffer or mechanism, can
act as a completely independent process as can the secondary data stream
or mechanism.
Conclusion
The Secondary Data Stream is in effect a means of transporting only the
data we deem as necessary in creating the “Alternate Means of Data Compression.
Or better yet, a means of transporting only truly unique data on which we
can build a meaningful result set while utilizing the lowest amount of resources.
The secondary data stream uses a completely independent process in achieving its goal and is generally deemed a “low bandwidth” type of operation. The secondary data stream is the physical link between the initial data store and the “compressed” data store.
Copyright© 2004, Thomas O’Hare – All Rights Reserved.
Thomas O'Hare
![]()
Web Tools Useful for Web Development
Farhad Bayanati
Of course the tools which we need to use for doing the job depend on the nature of the project, but some tools work like a jack of all the trades. On the web, we need to deal with colors, pictures, text, and more. These are tools that I use frequently.Aptana Studio Web development tool

Aptana Studio is an all-in-one application. Aptana has a great IDE, an excellent
environment to edit and create HTML, XML, JavaScirpt, CSS, text, or other
kind of documents. As a web development tool, absolutely take a chance and
try it for free. Aptana is dual-licensed under the GNU Public license and
the Aptana Public license, to get more information about it, take a look
at http://www.aptana.com/legal
page.
Aptana Studio introduction:
"Aptana Studio is the premier IDE for Today's Web offering integrated
language support for HTML, DOM, JavaScript and CSS, embedded development
platforms and databases for PHP, Jaxer, Ruby on Rails, and Python. Plus
support for emerging platforms that use Ajax like Adobe AIR and Apple iPhone.
Aptana Studio is free, open source software based on the Eclipse tools platform."
To download, find additional plugins or further information, visit http://www.aptana.com/.
Pixie
a fast and tiny color picker utility

Pixie is an easy-to-use color picker. Simply point to a color and it will
tell you the hex, RGB, HTML, CMYK and HSV values of that color. Pixie works
on Windows 95/98/Me/NT/2000/XP/Vista, any body who is dealing with web programming
or design needs to have such a simple and perfect tool to make it easy on
Internet life. Pixie will also show the current x y position of your mouse
pointer to find the point accurately. If you need to work with colors, then
it's the tool which you need. To download Pixie for free: http://www.nattyware.com/pixie.html
.
Cropper
- Point and Shoot Screen Captures
Cropper is a great screen capture tool written by Brian Scott in C#.NET

Cropper is like a Swiss Army knife in your pocket. I use Cropper to make
the images to feed GIMP (GNU Image Manipulation Program http://www.gimp.org/),
for picture editing and to bring up any snapshot which I want to have.
Point, Crop, and Save any area which you like.
To enjoy this fantastic tool, you can visit http://blogs.geekdojo.net/brian/articles/Cropper.aspx
.
JR Screen Ruler - A tool to measure the size of a picture

I remember that it was necessary a long time ago to be able to measure the
size of an image or part of the area you wanted to crop as a screen shot.
In the real world we are familiar with this ruler, in school, at home, in
the office, and ... it was our helper. JR Screen Ruler is handy for helping
you find out the size of a screen image. Everybody who deaks with web pages
knows how much it is worth. Find it at: http://www.spadixbd.com/freetools/index.htm
![]() |
If you want to have some fun, this is a good one. Go to http://www.genderanalyzer.com and enter the URL of any web site and it will tell you the gender of its writer! As the site tells you, it's powered by Artificial Intelligence rules to determine if a homepage is written by a man or woman. But don't get surprises if it shows opposite sex for the writer of your web page! it's in Beta version and needs to learn and experience more to be mature enough to determine it accurately. Just imagine how it can be used in real world to find out something from behind the scene! Have fun. |
MS SQL Server Common Table Expressions & Recursive Queries
Farhad Bayanati
MS SQL Server 2005 introduced Common Table Expression (CTE) which is temporary result set with a name that will be used in SELECT query statement by FROM clause. It makes the queries simpler and better for future maintenance. CTE defines a virtual view that will be used in another data manipulation language (DML) statement, for example in a SELECT.
CTE main elements:
It's not possible to use COMPUTE, COMPUTE BY, ORDER BY (unless TOP is used) in a CTE.
For example, in the AdventureWorksLT database sample (this is available in the CodePlex web pages, you can download it from: http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=4004 ), the Product table keeps information about products and the categories of the products are available in the ProductCategory table. The following example provides a temporary result set in the name of CheapProducts. It is derived from the Product table and those products with prices less than $100 (Ooops, I know, $100 is not really cheap , just take it easy). The query that comes after, is a request for BLACK products with their names and their category.
WITH CheapProducts
(ProductName, ProductColor, ProductPrice, ProductCategoryID)
AS
(
SELECT [name], [color], [listprice], [ProductCategoryID]
FROM [AdventureWorksLT].[SalesLT].[Product]
WHERE [listprice] < 100
)
SELECT chpPrd.ProductName, chpPrd.ProductPrice, prdCtg.Name as ProductCategory
FROM CheapProducts as chpPrd
JOIN [AdventureWorksLT].[SalesLT].[ProductCategory] as prdCtg
ON chpPrd.ProductCategoryID = prdCtg.ProductCategoryID
WHERE chpPrd.ProductColor = 'BLACK
This one was a simple sample, but when we have a more complex queries CTE can really help make it simple.
The next example lists the QUANTITY of PRODUCTS (and each product's CATEGORY) which are RED and with price less than $100, ordered by companies:
WITH PrdAndCat (PrdID,
PrdName, PrdColor, PrdPrice, PrdCategory)
AS
(
SELECT prd.[ProductID], prd.[name], prd.[color], prd.[listprice],
prdCtg.[Name]
FROM [AdventureWorksLT].[SalesLT].[Product] as prd
JOIN [AdventureWorksLT].[SalesLT].[ProductCategory] as prdCtg
ON prd.ProductCategoryID = prdCtg.ProductCategoryID
)
SELECT cstmr.CompanyName, ordrHdr.OrderDate, ordrDtl.OrderQty,
pNc.PrdName, pNc.PrdCategory
FROM [AdventureWorksLT].[SalesLT].[SalesOrderHeader] as ordrHdr
JOIN [AdventureWorksLT].[SalesLT].[SalesOrderDetail] as ordrDtl
ON ordrHdr.SalesOrderID = ordrDtl.SalesOrderID
JOIN [AdventureWorksLT].[SalesLT].[Customer] as cstmr
ON ordrHdr.CustomerID = cstmr.CustomerID
JOIN PrdAndCat as pNc
ON pNc.[PrdID] = ordrDtl.[ProductID]
WHERE pNc.PrdColor = 'RED' AND pNc.PrdPrice < 100
In the above example, SalesOrderHeader is the order header table, it is connected to the CUSTOMER table by the CustomerID column (Column in SQL and ADO.NET and field in VFP world! not in C# classes!!) and it connects to the SalesOrderDetail table by the SalesOrderID key. Our PrdAndCat CTE makes a connection to the SalesOrderDetail table through the ProductID column, here's the result set which we were looking for by utilizing a CTE which made our query somehow simpler.
Output:
| Bulk Discount Store | 2004-06-01 | 3 | Sport-100 Helmet | Red Helmets |
| Metropolitan Bicycle Supply | 2004-06-01 | 1 | Sport-100 Helmet | Red Helmets |
| Many Bikes Store | 2004-06-01 | 2 | Sport-100 Helmet | Red Helmets |
| Riding Cycles | 2004-06-01 | 6 | Sport-100 Helmet | Red Helmets |
| Action Bicycle Specialists | 2004-06-01 | 10 | Sport-100 Helmet | Red Helmets |
| Eastside Department Store | 2004-06-01 | 10 | Sport-100 Helmet | Red Helmets |
| Professional Sales and Service | 2004-06-01 | 3 | Sport-100 Helmet | Red Helmets |
Recursive Queries by CTE
CTE is very useful when we want to perform recursion by defining a self referencing query. In the Northwind Database sample (downloadable from CodePlex web pages) the Employees table has a column with the title ReportsTo which refers to the EmployeeID of another Employee. record. This is the ID of the manager of the employee in the current record. The exception is for managers. Their ReportsTo column is NULL (They are lucky people who don't need to report to anybody, watch out, it shows you are responsible not them!). The managers are sitting in Level 1 and employees are in the next levels. Employees report to their manager who are in a level above. The table has a reference to itself, it's a join back that is possible to implement by utilizing the power of recursive connection.
To cover all the sub levels and show Employees and their managers, we need to UNION result sets of multi levels all together and go deep inside till find all requested info. Each time that the query needs to go one level deeper, the Level column adds by 1 to show the correct level of employee in organization diagram.
WITH Emp (EmpID,
EmpName, ManagerID, ManagerName, [EmployeeLevel] )
AS
(
SELECT EmpTbl.EmployeeID, EmpTbl.LastName, EmpTbl.ReportsTo,
EmpTbl.FirstName+SPACE(1)+EmpTbl.LastName, 1
FROM [Northwind].[dbo].[Employees] as EmpTbl
WHERE ReportsTo IS NULL
UNION ALL
SELECT EmpTbl.EmployeeID, EmpTbl.LastName, EmpTbl.ReportsTo,
Mgr.FirstName+SPACE(1)+Mgr.LastName, [EmployeeLevel] + 1
FROM [Northwind].[dbo].[Employees] as EmpTbl
JOIN Emp
ON Emp.EmpID = EmpTbl.ReportsTO
JOIN [Northwind].[dbo].[Employees] as Mgr
ON EmpTbl.ReportsTO = Mgr.EmployeeID
)
SELECT EmpID, EmpName, ManagerID, ManagerName, [EmployeeLevel]
FROM Emp
Output:
| 2 | Fuller | NULL | Andrew Fuller | 1 |
| 1 | Davolio | 2 | Andrew Fuller | 2 |
| 3 | Leverling | 2 | Andrew Fuller | 2 |
| 4 | Peacock | 2 | Andrew Fuller | 2 |
| 5 | Buchanan | 2 | Andrew Fuller | 2 |
| 8 | Callahan | 2 | Andrew Fuller | 2 |
| 6 | Suyama | 5 | Steven Buchanan | 3 |
| 7 | King | 5 | Steven Buchanan | 3 |
| 9 | Dodsworth | 5 | Steven Buchanan | 3 |
Thanks to all the people who contributed to such beautiful and powerful features for developers.
![]()
AdventureWorks sample database for SQL server 2005 Express
Farhad Bayanati
When I tried to install the AdventureWorks sample database in SQL Server 2005 Express on Windows Vista home premium machine, I encountered an error about lack of permission. I could install it after configuring permissions.First download the AdventureWorks:
- Use the following URL to download AdventureWorksLT.msi file:
http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=4004
- Click on AdventureWorksLT.msi to save the file in your favorite
location in your machine.
- Click on Run, once the download is complete.
Permission configuration:
- Run Windows Explorer (Windows Key + E)
- Use "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data"
as path (My "Program Files" folder is usually in your C:
Drive).
- Right click on AdventureWorksLT_Data.mdf and select Properties
- Then Security->Edit->Add
- In the "Enter the object names ... " textbox enter your
login name
- Click on Check Names, the entered name changes to <MACHINENAME>/Login
then click OK.
- Select your login name from Groups or username list and choose Full
control then click OK and OK
- Repeat the same sequence for AdventureWorksLT_Log.ldf
Sql Server Management Studio:
- If you don't have Microsoft SQL Server Management Studio Express,
download it from (Microsoft Download Center) at URL:
http://www.microsoft.com/downloads/details.aspx?FamilyId=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en
- Launch Sql Server Management Studio Express and connect to your
local server.
- Right click on Databases in Object Explorer and click on Attach
- click on Add and select AdventureWorksLT_Data.mdf and again click
on OK
- finally click on OK and now you can find it in Object Explorer
Databases > AdventureWorksLT
That's all, Hope it helps if you encountered the same problem.
![]()
By Thomas O'Hare
Overview
This document will supply advanced user level information about the File
Transfer Protocol (FTP) required to make it operate and operate efficiently.
FTP is a widely used protocol and a basic understanding of it must be achieved.
The Protocol
The FTP protocol is an Internet (network) based protocol. It is used mainly in the transfer of files from one location to another in either direction. There are many interfaces that support FTP operations that are free and easy to use. It has been in existence since the early days of the Internet and is still one of the most common protocols used.
Ports Used
FTP uses 2 connection ports, ports 20 & 21. Both of these ports must
be open at any firewall level for FTP to operate. Many people know of the
FTP Connection Port, port 21, but fewer know that the Data Port, port 20,
is also required to transfer data.
In simple terms, a client connects to an FTP server on port 21. After the initialization and a file transfer is about to occur, a data port is opened on the server, port 20. When the actual data is exchanged the data travels on port 20 and possibly communication on port 21 is dropped. Only port 20 may remain open until the end of the transfer.
If a firewall is used by either end of a connection then both port 21 and port 20 must be open on the server for inbound data and port 20 & 21 on the client for outbound traffic.
The "gotcha" is that some firewalls have "outbound rules". If outbound rules do not allow both port 20 & 21 on a client side, then the FTP connection will fail. This is particularly true if Microsoft Firewall (comes with XP, Vista, 2003 server & 2008 server) is enabled.
There are many different types of FTP such as FTPS, SFTP, FTPES and even FTP active & passive mode. Many of the characteristics of FTP can change if one of the other flavors of FTP is used, but two ports are used for every flavor of FTP protocol.
Resources
http://en.wikipedia.org/wiki/File_Transfer_Protocol
![]()
What's New for Spanish VFUG Members
Isaac Venegas
VFP 9 Spanish IDE and other VFP Information in Spanish
The VFP9 IDE in Spanish has been released.
For information in Spanish, go to http://www.portalfox.com
![]()
Resources for German VFUG Members
Rainer Becker
Details regarding the German DevCon (including German, French and Czech
IDE for VFP9 and VFP9 SP1) can be found in the portal of the German
usergroup. In addition, localized report writer applications have
been made available. Files can be downloaded for a free trial at dfpug
portal and/or with a low donation request at http://shop.visualextend.com.
| German FoxPro User Group |
The dFPUG supports 800+ companies in Germany, Austria and Switzerland with a quarterly magazine, regional meetings in a dozen cities, a wellknown yearly conference and a lot of online material. |
| dFPUG Wiki | Interactive Wiki |
| dFPUG Interactive Forum | Interactive Forum |
| dFPUG Portal | German SharePoint Portal for Visual FoxPro (http://portal.dfpug.de/dfpug)
with the conference binders of the yearly German VFP Developer conference
(800 pages 1994-2002) and the quarterly loose-leaf-magazine FoxX Professional
(200 pages per issue). Use category "English" as starting
point for english material related to Visual FoxPro. |
| dFPUG Newsletter | The newest offer is an electronic newsletter, which is published every 4-6 weeks with actual information e.g. about the next German VFP DevCon (http://devcon.dfpug.de), changes in the VFX-framework (http://www.visualextend.com) or regarding localization for VFP 9.0 done by dFPUG. |
![]()
I strongly urge you to go to at least one conference each year. Pick the one closest to your home to reduce travel time. Pick the one where you can understand the speakers' language. But argue your boss into letting you have the time off to attend one at least every 2 years. You'll be glad you did.
Southwest Fox, Phoenix, AZ, October 15 - 18, 2009. The best Visual FoxPro conference in North America is back! Phoenix, Arizona is the place to be in October 2009 as the top VFP gurus on the planet show you how to make the most of VFP.
Silicon Valley CodeCamp, Los Altos Hills, CA, October 3 - 4, 2009. Code Camp is a new type of community event where developers learn from fellow developers. All are welcome to attend and speak. Code Camps have been wildly successful, and we’re going to bring that success to Northern California.
The Code Camp Manifesto consists of six points: (1) by and for the developer
community; (2) always free; (3) community developed material; (4) no fluff
– only code; (5) community ownership; and (6) never occur during working
hours.
German DevCon 2009, Frankfurt, Germany, November 12- 14, 2009
VFP's 25th Anniversary Convention, Portland, ME, August 18- 22, 2010
Send me an email to add yours to the list. Please include a URL and contact name/email if possible.
Tell me what others to list!
![]()
By the Editor
Non-VFP Software and Programming
Hardware and Operating Systems
Web Services, XML, HTML and Other Internet Items
| Practical paranoia: trust, but verify | TechRepublic |
| What Danger Lay Waiting In Shortened URLs? | NetworkWorld |
| Clever PHP performance tip | TechRepublic |
| Google's Top 17 Easter Eggs, Gags, and Hoaxes | PCWorld |
| Translate Documents: Sharing across languages and generations | GoogleBlogs |
| Taking Full Screenshots of Web Pages Was Never This Easy! | Digital Inspiration |
| Why the ocean matters...to Google | Cnet |
| Avoid problems by regularly checking site links | TechRepublic |
| Protect your JavaScript with obfuscation | BuilderAU |
| Silverlight 3 | Microsoft |
| Five HTML oddities that you may not know | TechRepublic |
| Who Really Owns Digital Music? | PCMag |
| Two approaches to redirection in ASP.NET | BuilderAU |
| Search interfaces of tomorrow you can try today | CNet |
![]()
By the Membership
Q: How do you load a user's default browser instead of IE?
A: ITo open a web page with the default browser, I use shellexecute:
declare integer ShellExecute
in shell32.dll ;
integer nWinHandle, ;
string cOperation, ;
string cFileName, ;
string cParameters, ;
string cDirectory, ;
integer nShowWindow
lcUrl = "www.vfug.org"
ShellExecute (0, "Open", lcUrl, null, null, 1)
Ricardo Molina (from the VFUG ListServer)
![]()
Q: How can I get the version # of my EXE easily w/o using the GetFileVersion()? If someone renames my EXE it will not work.
A1: Use SYS(16,0). From the Help file: "SYS(16) returns the name of the executable file if called from an executable (.exe) file; whereas PROGRAM( ) returns just the program name."
A2: A more elaborate version of the answer above: In the form's INIT() method I add
LOCAL ARRAY aFile[1] as String
AGETFILEVERSION( aFile, Sys( 16,0))
TRY
this.txtVersion.Value = [Version: ] + aFile[ 4]
this.txtVersion.ToolTipText = aFile[ 4]
CATCH
this.txtVersion.Value = [Version: Unknown]
this.txtVersion.ToolTipText = [Unknown]
ENDTRY
Steve Wiley and Gary Bettle (from the VFUG ListServer)
![]()
How do I determine if I'm in Development Mode or EXE?
Q: Is there a function that tells you if you are running in dev mode or runtime mode (EXE)?
A1: Version(2) # 0 - NOT and executable
A2:_vfp.StartMode property is what you are looking for.
Possible values are:
0 - A development version of Visual FoxPro was started in an interactive
session.
1 - Visual FoxPro was started as an application object.
2 - Visual FoxPro was started as an out-of-process .exe automation server.
3 - Visual FoxPro was started as an in-process .dll automation server.
4 - Visual FoxPro was started as a distributable .app or .exe file.
5 - Visual FoxPro was started as an in-process .dll automation server for
multithreaded use.
Ed Hardin, RObert McNeal and others (from the VFUG ListServer)
![]()
How to start System Restore when you can't boot into XP
If you're having problems that prevent you from booting into the GUI, you may still be able to use the System Restore tool to roll back to a previous operating system state, and thereby fix the problem. Here's how:
1. Restart the computer and press and hold F8 during startup to bring
up the options menu
2. Select "Safe mode with a command prompt"
3. If you have multiple operating systems installed, select the correct
instance of XP
4. Log on with an administrative account
5. At the command prompt, type
/ %systemroot%\system32\restore\rstrui.exe/
and press ENTER
6. Follow the on-screen instructions
From the WXPNews
![]()
Office Automation - Prevent Track Changes
Q: Is there a command for turing off traffic in Office Automation? It bogs down doc generation and makes the doc unreadable until it's turned off.
A:
With ActiveDocument
.TrackRevisions = True
.ShowRevisions = True
End With
O.ActiveDocument.ShowRevisions = .F.
Andrew Maki and Tom O'Hare(from the VFUG ListServer)
![]()
Q: Is there a way to reverse the RGB() function.
LnColor = RGB(100,112,200)
LnRed = ???(lnColor)
LnGreen = ???(lnColor)
Etc..
A1: * This method extracts the blue portion from a combined colour
value, in
* other words it reverses the B part of the RGB() function, which occupies
* the left-hand 8 bits (yes it really is the left, not the right).
LPARAMETERS lcColourValue
LOCAL lnColour
lnColour = EVALUATE(lcColourValue)
IF VARTYPE(lnColour) = "N"
RETURN BITAND(255,BITRSHIFT(lnColour,16))
ELSE
RETURN 0
ENDIF
* This method extracts the green portion from a combined colour value,
in
* other words it reverses the G part of the RGB() function, which occupies
* the middle 8 bits.
LPARAMETERS lcColourValue
LOCAL lnColour
lnColour = EVALUATE(lcColourValue)
IF VARTYPE(lnColour) = "N"
RETURN BITAND(255,BITRSHIFT(lnColour,8))
ELSE
RETURN 0
ENDIF
* This method extracts the red portion from a combined colour value, in
* other words it reverses the R part of the RGB() function, which occupies
* the right-hand 8 bits (yes it really is the right, not the left).
LPARAMETERS lcColourValue
LOCAL lnColour
lnColour = EVALUATE(lcColourValue)
IF VARTYPE(lnColour) = "N"
RETURN BITAND(255,lnColour)
ELSE
RETURN 0
ENDIF
A2:
Set Library To foxtools
Store 0 TO lnR, lnG, lnB
RGBComp(Rgb(1,2,3),@lnR,@lnG,@lnB)
? lnR, lnG, lnB
-- Phil Hawkins and Christof Wollenhaupt (from the VFUG ListServer)
![]()
Intellisense With Custom Classes
Q: I am looking for a way to have Intellisense read
and display information from my custom classes. here is my latest attempt
SET PROCEDURE TO PremierClasses
additive
configuration = CREATEOBJECT('TConfiguration')
MESSAGEBOX( configuration.tostring() )
configuration.select
when I type the dot after configuration no intellisense comes up ...
A1: If I compile as a dll and then reference the dll intellisense does work.
A2: Try adding a line at the top of your code file such as:
Local configuration AS TConfiguration of PremierClasses.prg
Then when you call CreateObject() and type configuration you'll get Intellisense.
Ensure that the program is in the current directory, or you can just put
the path in e.g. local configuration as TConfiguration of c:\dev\premierclasses.prg
-- Ricardo Molina, Robert McNeal and Matt Slay (from the VFUG ListServer)
![]()
Multiple DVD or CD Drives Stop Working?
Q: My two DVD drives suddenly stopped working. Now in the control panel I get a yellow circle with an exclamation point in it on both. I tried all the normal stuff like uninstall, check cables, etc, and same old stuff. The only drivers I have is what comes with Win XP. I looked everywhere for new drives and nada.
I could see 1 drive with a problem but 2? I have no idea exactly when this started -- just finally noticed it recently when I tried to use the drives.
A: It turns out to be a registry issue. You need to delete 2 entries: http://www.hardwareanalysis.com/content/topic/35761/
Tom O'Hare
![]()
PEM Editor version 4.1 released on VFPx
PEM Editor version 3.0 released on VFPx. (Formerly named Edit Property/Method Dialog Replacement)
http://www.codeplex.com/VFPX/Wiki/View.aspx?title=PEM%20Editor
Many new features added:
Much more...
Matt Slay
![]()
Find the Default .DOC File (Word or Open Office)
Q: I need to work in a MS Word/Open Office environment. I need to find out the default DOC (rich text) editor on a system. I then need to use that program to open a DOC (Word) file for viewing/editing. Anyone have an API (or whatever) call to first find the default program used to open *.DOC files?
A1: Try the following.
I've got it saved as shellit.prg
** WinApi :: ShellExecute
** Function: Opens a file in the application
** that it's associated with.
** Pass: lcFileName,working directory,operation,parameters,0 or 1 to hide/show
- Name of the file to open
** sample call:
** shellit('filenamewithpath','','open','',1) && typical call to
open the document
** Return: 2 - Bad Association (ie, invalid URL)
** 31 - No application association
** 29 - Failure to load application
** 30 - Application is busy
**
** Values over 32 indicate success
** and return an instance handle for
** the application started (the browser)
LPARAMETERS tcFileName, tcWorkDir, tcOperation, tcParam, tiShow
LOCAL lcFileName, ;
lcWorkDir, ;
lcOperation, ;
lcParam, ;
liShow
IF EMPTY(tcFileName)
RETURN -1
ENDIF
lcFileName = ALLTRIM(tcFileName)
lcWorkDir = IIF(TYPE("tcWorkDir") = "C",ALLTRIM(tcWorkDir),"")
lcOperation = IIF(TYPE("tcOperation")="C" AND NOT EMPTY(tcOperation),ALLTRIM(tcOperation),"Open")
lcParam = IIF(TYPE("tcParam")="C" AND NOT EMPTY(tcParam),ALLTRIM(tcParam),"")
liShow = IIF(TYPE("tiShow")="N",tiShow,1)
** ShellExecute(hwnd,
lpszOp, lpszFile, lpszParams,;
** lpszDir, wShowCmd)
**
** HWND hwnd - handle of parent window
** LPCTSTR lpszOp - address of string for
** operation to perform
** LPCTSTR lpszFile - address of string for filename
** LPTSTR lpszParams - address of string for
** executable-file parameters
** LPCTSTR lpszDir - address of string for default
** directory
** INT wShowCmd - whether file is shown when
** opened
DECLARE INTEGER ShellExecute ;
IN SHELL32.DLL ;
INTEGER nWinHandle,;
STRING cOperation,;
STRING cFileName,;
STRING cParameters,;
STRING cDirectory,;
INTEGER nShowWindow
RETURN ShellExecute(0,lcOperation,lcFilename, lcParam,lcWorkDir,liShow)
Andrew Maki (from the VFUG ListServer)
![]()
Q: I am testing windows 7 beta on visual foxpro 9 sp2
The core vfp works fine, but my sql views and sqlexe commands seem to fail at every turn.
Odbc connections to the SQL server where my database points to connect work fine when I fill in all the info. But when I open projects, and look at connections and views, they are messed up. If I fix them in the win64, they begin to work there (though it appears I have to touch every view and connection)
I also discovered that data sources were not available to views, and could only be created if I ran vfp as administrator.
A1: The issue was that in this legacy systems approach to data, the connection to the SQL database was defined in connection designer, the data source (defined in odbc) was there, the user id (fixed) and password were there but not the database name (which was named in the client odbc setup)
Once I added the database name, the compiled version worked fine on both win7 beta 64 bit and xp 32 bit.
Bob Morrell (from the VFUG Forum)
![]()
Some final comments....
Coming Soon: More articles by
Want to be (in)famous? All you have to do is send VFUG an article, tip or otherwise useful item. We are 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 Tom O'Hare to get with it. Also, if you are interested in your company placing a banner advertisement on our home page, please contact Carl.
![]()
|
|