Anda di halaman 1dari 19

Visual FoxPro

History
FoxPro originated as a member of the class of languages commonly referred to
as "xBase" languages, which have syntax based on the dBase programming language. Other
members of the xBase language family include Clipper and Recital. (A history of the early years of
xBase can be found in the dBase article.)
Visual FoxPro, commonly abbreviated as VFP, is tightly integrated with its own relational database
engine, which extends FoxPro's xBase capabilities to support SQL query and data manipulation.
Unlike most database management systems, Visual FoxPro is a full-featured, dynamic programming
language that does not require the use of an additional general-purpose programming environment.
It can be used to write not just traditional "fat client" applications, but also middleware and web
applications.
In late 2002, it was demonstrated that Visual FoxPro can run on Linux under the Wine Windows
compatibility suite. In 2003, this led to complaints by Microsoft: it was claimed that the deployment of
runtime FoxPro code on non-Windows machines violates the End User License Agreement.[6]
Visual FoxPro had a rapid rise and fall in popularity as measured by the TIOBE Programming
Community Index.[7] In December 2005, VFP broke into the top 20 for the first time. In June 2006 it
peaked at position 12, making it (at the time) a "B" language. By September 2010, FoxPro and its
variants had fallen out of the top 50, where it has remained ever since.
In March 2007, Microsoft announced that there will be no VFP 10,[8] thus making VFP9 (released to
manufacturing on December 17, 2004) the last commercial VFP release from Microsoft. The support
of Version 9 is ongoing with service packs that were released December 8, 2005 and October 11,
2007.
At the time of the end of life announcement, work on the next release codenamed Sedna (named
after a recently discovered dwarf planet) which was built on top of the VFP9 codebase had already
begun. "Sedna" is a set of add-ons to VFP 9.0 of xBase components to support a number of
interoperability scenarios with various Microsoft technologies including SQL Server 2005, .NET
Framework, Windows Vista, Office 2007, Windows Search and Team Foundation Server (TFS).
Microsoft released Sedna under the Shared source license on the CodePlex site. Microsoft has
clarified that the VFP core will still remain closed source. Sedna was released on January 25, 2008.
[9]

As of March 2008, all xBase components of the VFP 9 SP2 (including Sedna) were available for

community-development on CodePlex.

In late March 2007 a grassroots campaign was started by the Spanish-speaking FoxPro community
at MasFoxPro[10] ("MoreFoxPro" in English) to sign a petition to Microsoft to continue updating Visual
FoxPro or release it to the community as Open Source. On April 3, 2007 the movement was noted
by the technical press[11]
Also on April 3, 2007 Microsoft responded to the petitioner's requests with this statement from Alan
Griver:
"We're very aware of the FoxPro community and that played a large part in what we announced on
March 13th. It's never an easy decision to announce that we're not going to release another version
of a product and it's one that we consider very carefully.
"We're not announcing the end of FoxPro: Obviously, FoxPro applications will continue to work. By
some of our internal estimates, there are more applications running in FoxPro 2.6 than there are in
VFP and FoxPro 2.6 hasn't been supported in many years. Visual FoxPro 9 will be supported by
Microsoft through 2015.
"For Microsoft to continue to evolve the FoxPro base, we would need to look at creating a 64-bit
development environment and that would involve an almost complete rewrite of the core product.
We've also invested in creating a scalable database with SQL Server, including the freely available
SQL Server Express Edition. As far as forming a partnership with a third-party is concerned, we've
heard from a number of large FoxPro customers that this would make it impossible for them to
continue to use FoxPro since it would no longer be from an approved vendor. We felt that putting the
environment into open source on CodePlex, which balances the needs of both the community and
the large customers, was the best path forward."

Picture /capabilities
Microsoft Visual FoxPro gives you more of everything you have come to expect in a database
management system (DBMS) speed, power, and flexibility. In addition, Visual FoxPro leads you into
the next generation by providing object and event models that help you create and modify applications
faster than ever before.
The following topics walk you through some of the major features in Visual FoxPro. For information on the
newest enhancements in this version of Visual FoxPro, see What's New in Visual FoxPro.

In This Section
Rapid Application Creation
Discusses how you can develop applications rapidly with help from Visual FoxPro wizards,
builders, toolbars, and designers, and implement them quickly using the Visual FoxPro object and
event models.
Advantages of More Power

Describes how you can take advantage of Visual FoxPro's object-oriented programming
capabilities as well as features such as Rushmore Query Optimization technology to improve
performance and speed up application development.
User Interface Creation without Programming
Discusses the powerful controls provided by Visual FoxPro that give you interfaces that require
little or no coding.
Application Development with Several Developers
Discusses using Visual FoxPro to enable simultaneous access to database components and
using source control programs with the Project Manager to track and protect changes to your
source code.
Interaction with Other Applications
Provides information about sharing data with other applications, such as Microsoft Excel and
Microsoft Word, using objects from other applications, and controlling other applications using
automation.
Client/Server Solution Development
Discusses how you can use Visual FoxPro as a front end for developing robust client/server
applications. It combines the higher-level support of updatable views of server data with direct
access to native server syntax using SQL pass-through.

Related Sections
Getting Started with Visual FoxPro
Provides links to information about installing, upgrading, and customizing Visual FoxPro, as well
as accessing the latest readme files.
Using Visual FoxPro
Provides information on Visual FoxPro programming features and productivity tools, as well as
sections on development of Visual FoxPro applications.
Samples and Walkthroughs
Provides examples of common scenarios and step-by-step guides that enable you to learn how to
create different types of applications and components in Visual FoxPro.
Customizing the Visual FoxPro Environment

Discusses settings that enable you to customize your development environment, including the
main window title, default directory, project, editor, debugger and form tool options, temporary file
storage, field mappings for drag-and-drop operations, and many other options.
Developing Visual FoxPro Applications
Includes conceptual information about how to develop Visual FoxPro applications, instructions for
creating databases and the user interface, and other tasks needed to create Visual FoxPro
applications.
Programming in Visual FoxPro
Describes how you can access the full power of Visual FoxPro by creating applications.
Understanding object-oriented programming techniques and the event-driven model can
maximize your programming productivity.
Development Productivity Tools
Provides information on developer tools for application development within the Visual FoxPro
application and the language.

Shamelessly copied from VFP help, and pasted here for reference purposes

Some capacities may be limited by available memory.

Category

Feature

Table and Index Files

Maximum #

Maximum s

Maximum #

Maximum #

Maximum #

Maximum #

Maximum #

Maximum #

Maximum #

Maximum #

Maximum #

Maximum l
Field Characteristics

Maximum s

Maximum s

Maximum n

Maximum n

Minimum v

Maximum v

Digits of pr
Variables and Arrays

Default # o

Maximum #

Maximum #

Maximum #
Program and Procedure Files

Maximum #

Maximum s
modules(4)

Maximum #

Maximum #

Maximum #

Maximum #

Maximum #

Maximum #
Report Designer Capacities

Maximum #

Maximum l

Maximum #

Maximum l
Other Capacities

Maximum #

Maximum #

Maximum #

Maximum #

Maximum #

Maximum #

Maximum #

Maximum k

Maximum f
1 If one or more fields allow null values, the limit is reduced by one to 254 fields.
2 Limited by memory and available file handles. .cdx files use only one file handle.
3 If the collating sequence is set to MACHINE, each character uses one byte. If the collating
sequence is not set to MACHINE, each character uses two bytes. If the indexed field supports null
values, one additional byte is used in the index key. Note that non-machine indexes are always
compact.
4 A program module is one procedure. A program or application can contain an unlimited number of
program modules.

Other miscellaneous limits should be listed in the VFP System Capacities documentation.
Maximum Number of Bytes Read Using Low-Level Functions
http://support.microsoft.com/default.aspx?scid=kb;en-us;105043&Product=fox
65,535 bytes is the maximum number that FREAD() and FGETS() can read at one time.
The maximum file size purported, but not documented, to be read by LLF I/O is 2Gb.

Microsoft Visual FoxPro is a discontinued product. This will have an important impact
oncompanies that have investments based on this technology. The degree and cost of that impact
will
vary by company and industry.
Companies that use Visual FoxPro for mission critical programs should be making plans for retiring
these systems. Those with major systems (i.e., systems with more than six manmonths of effort)
should begin making plans sooner than later to allow adequate time for redevelopment, testing and
deployment.
Installation process

Create an Application to Distribute


For the purposes of this demo, the Visual FoxPro Application Wizard was used to create an application
called VFPVSIDemo. The application was then built into an EXE, called VFPVSIDemo.exe.
The data used by the application is in a folder named Data. This folder is a subfolder of the main
application folder.

Step 1: Open Visual Studio Installer


1. Click Start, and select Programs.
2. From the Programs menu, select Microsoft Visual Studio 6.0, and then select Microsoft
Visual Studio 6.0 Enterprise Tools.
3. From the Microsoft Visual Studio 6.0 Enterprise Tools menu, click Visual Studio Installer.
4. The Microsoft Development Environment launches, and you can create a new installer project
from the New tab in the New Project dialog box.
5. Create an empty installer project by highlighting the Empty Installer icon.
6. Enter VFPVSIDemo as the name of the project.
Make a note of the directory in the Location textbox. This is where the application installer file
you create will be located. You can change the location for your project if you like.
7. Choose Open.

Figure 1. Creating a new Visual Studio Installer project


Visual Studio Installer creates your installer project. The Project Explorer displays your installer project
hierarchy. You can expand the Target Machine node to start setting up the configuration of your installed
product on the target machine.

Figure 2. Empty Visual Studio Installer project


For more detailed information about creating installer projects, see Creating and Opening Installer
Projects.

Step 2a: Add Application Files to the Installer


Project
The File System editor in Visual Studio Installer gives you a way to configure your application files on the
target machine while you add them to the installer project.
1. In the Project Explorer, expand the Target Machine node.
2. Double-click File System in the Target Machine node.
3. In the File System editor, right-click Application Folder.
4. Select Add File(s) from the context menu.
5. In the Browse for Files dialog box, navigate to the directory that contains the application. Select
the files you want to add. In this case, choose the file VFPVSIDemo.exe.
6. Click Open.
The File System editor displays the file(s) you added in the folder you selected. The files are also
listed in the installer project Files node in the Project Explorer.

Figure 3. Files added to the installer project


7. In the File System editor, select Users Start Menu.
8. In the Name column, right-click and select Create Shortcut.
9. In the Shortcut Properties dialog, select VFPVSIDemo.exe and choose OK.
10. Right-click the shortcut and choose Rename. Rename the shortcut VFPVSIDemo.
This places a shortcut to the file VFPVSIDemo.exe on the users Start menu.
See the following topics for more detailed information about working with files in an installer project:

For information about:

See:

The Visual Studio Installer File System


editor

File System Editor

Adding files to an installer project

Adding Files to an Installer Project

Adding, moving, or deleting different


kinds of files in an installer project and
managing the file structure of installer
components

Managing Components, Files, and


Folders in an Installer Project

Setting file properties

File Properties

Step 2b: Add Data Files to the Installer Project


In the previous step, you added the application files to the installer project. In this step, you will add the
data files, which reside in a different directory.
1. In the File System editor, right-click Application Folder.
2. Select Add Folder from the context menu.
3. Change the name of the new folder to Data.
4. In the File System editor, right-click Data.
5. Select Add File(s) from the context menu.
6. In the Browse for Files dialog box, navigate to the directory that contains the application. Select
the files you want to add. In this case, choose each of the data files.
7. Click Open.

Figure 4. Data files added to the installer project

Step 3: (Optional) Configure Project Properties


1. Select the VFPVSIDemo project in the Project Explorer window.
2. At the end of the Project menu, select the VFPVSIDemo Properties option.
The Project Properties dialog box appears. You can view or change the project properties in the Project
Properties dialog box.
For information about the different project properties and how to modify them, see Project Properties
Dialog Box.

Step 4: (Optional) Modify the Target Machine


System Registry
With the Visual Studio Installer Registry editor, you can specify registry values and keys in the target
machine system.
1. In the Project Explorer, expand the Target Machine node under your installer project.
2. Double-click Registry in the Target Machine node.
The Registry editor appears.

See the following topics for more detailed information about manipulating the target machine registry:

For information about:

See:

Adding and deleting registry keys and


values, as well as setting registry
values

Manipulating the Target Machine


Registry

The Visual Studio Installer Registry


editor

Registry Editor

Setting properties for registry entries

Registry Properties

Step 5: (Optional) Establish Document and MIME


Type and COM Object Associations
With the Visual Studio Installer Associations editor, you can specify how the target machine operating
system will install and register your document types, MIME types, COM objects, and type libraries.
1. In the Project Explorer, expand the Target Machine node under your installer project.
2. Double-click Associations in the Target Machine node.
The Associations editor appears.
See the following topics for more detailed information about working in the Associations editor:

For information about:

See:

Working with document types, extensions, verbs,


MIME types, COM objects, and type libraries

Setting File, MIME, COM Object, and Type Library


Associations

The Visual Studio Installer Associations editor

Associations Editor

Configuring properties for document types, file


extensions, verbs, COM objects, and type libraries

Visual Studio Installer Object Properties

Step 6: (Optional) Customize the Installation RunTime Dialog Boxes


With the Visual Studio Installer User Interface editor, you can customize the installation run-time display.
Specifically, you can specify and customize dialogs that are displayed during the installation process.
1. Open the solution containing your Visual Studio Installer project.
2. In the Project Explorer, expand the Target Machine node under your installer project.
3. Double-click User Interface in the Target Machine node.
The User Interface editor appears.
See the following topics for more detailed information about installation user interface dialogs:

For information about:

See:

Available user interface dialogs

Installation User Interface Dialogs

The Visual Studio Installer User Interface


editor

User Interface Editor

Adding dialogs to the installer project

Adding Installation Dialogs

Deleting dialogs from the installer project

Deleting Installation Dialogs

Customizing available dialogs

Customizing Installation Dialogs

Working with dialog properties

User Interface Dialog Properties

Step 7: Add Merge Modules


A merge module (.msm file) is a single package that includes all files, resources, registry entries, and
setup logic to install a shared component. Visual FoxPro applications should always include the following
merge modules:

VFP6RUN.MSM

MSVCRT.MSM

OLEAUT32.MSM

The files MSVCRT.MSM and OLEAUT32.MSM ship with Visual Studio Installer. You can find these and
other merge modules in the directory c:\Program Files\Microsoft Visual
Studio\Common\Tools\VSInst\BuildRes.
Note The files contained in MSVCRT.MSM and OLEAUT32.MSM are automatically installed by
Windows 2000. Therefore you do not need to add these merge modules to the Installer project if you
know the application will only be installed on Windows 2000.
Save the file VFP6RUN.MSM (available from the sample download at the top of this article) to the
directory with the other merge modules.
1. Choose Add Merge Module(s) from the Project menu.
2. In the Browse for Merge Module dialog highlight the file VFP6RUN.MSM and choose Open.
The VFP6RUN.MSM merge module installs and properly registers the Visual FoxPro 6.0 run-time
libraries. Refer to Using Microsoft Visual Studio Installer for Distributing Visual FoxPro 6.0 Applications for
a reference guide to other available merge modules that ship with Visual Studio Installer.

Step 8: Build an Installer Package (.msi) File


After you configure all elements of an applications installation in your installer project, you must build the
project into an installer package (.msi) file. You can then distribute the .msi file to users who want to install
your application.
1. In the Project Explorer, select your installer project.
2. Make sure the Build type project property (on the Build tab of the Project Properties dialog
box) is set to either:

or

Installer

Installer with Windows Installer Loader

3.
Note For information about these options, see the Build Tab (Project Properties Dialog
Box) topic.
4. With the installer project selected in the Project Explorer, select Build from the Build menu.
You should see the message Solution Update Succeeded in the Status Bar if the project built
successfully. If errors occurred, you should see them in the Task List.
For more information, see Building an Installer Package (.msi) File.

Step 9: Test the Installer Package (.msi) File


For development and debugging purposes, the best way to launch your installer package (.msi) file is
from within the Microsoft development environment.
1. In the Project Explorer window, right-click the VFPVSIDemo project.
2. Select Launch Installer from the context menu.
3. Select Next on the opening screen of the VFPVSIDemo Setup Wizard.

Figure 5. Opening screen of VFPVSIDemo Setup Wizard


4. In the Select Installation Folder step, you can choose to install the application in the default
directory or change the directory.

Figure 6.
Select
Installation
Folder step
in

VFPVSIDemo Setup Wizard


5. In the Confirm Installation step, select Next to begin the installation.
6. When the installation is complete, select Close to exit the VFPVSIDemo Setup Wizard.
7. Choose VFPVSIDemo from the Start menu to launch the application.
For more information about these Windows installer requirements and launching an installer package file,
see Launching an Installer Package File.
Note If you set the Build Type as Installer with Windows Installer Loader in the previous step, you
should run SETUP.EXE file to test your setup.
Run the application to confirm the installation succeeded. If you accepted the defaults, the application is
installed in the directory C:\Program Files\VFPVSIDemo and the data is installed in C:\Program
Files\VFPVSIDemo\Data.

Step 10: Distribute the Application


Your application is now ready for distribution. The file VFPVSIDEMO.MSI contains the application and the
files in the VFP6RUN.MSM merge module.
1. Locate the VFPVSIDemo.msi file. If you accepted the default Location when you created the
project, it will be in a directory such as Visual Studio Projects\VFPVSIDemo\Output\DISK_1\.
2. To launch the installer, double-click the file VFPVSIDemo.msi.

3. Open the VFPVSIDemo Setup Wizard. Choose Repair VFPVSIDemo to reinstall the application.
Choose Remove VFPVSIDemo to uninstall the application. Then chooseFinish.

Figure 7. Repair or Remove in VFPVSIDemo Setup Wizard

Security and maintenance


Network security is all or nothing. Once a user has access to the data,
they can add, modify or delete information. An application program the user is
using can add more protection but if the user is able to by-pass, this, they then
have complete access to do any changes desired. If the data is stored on a
local area network, a request from the user sends data to the users
computer. The request is then processed on the user system. This causes
many data blocks to be transmitted over the network causing slow network
response and bottlenecks.

System Back-up and modification can only happen when the system is
brought off-line.
The application language used with the FoxPro file-server is the Visual
FoxPro development language. Technically Visual FoxPro can be used to
retrieve data from SQL Server. Still, any application previously written for a
FoxPro file-server would have to have large sections rewritten in order to
optimize SQL Server data retrieval. Since Visual FoxPro is not part of Visual
Studio.Net this might not be the ideal language to choose for a rewrite.
Visual FoxPro is adequate on limited networks but cannot be expand to larger
number of users. Many experts predict that the long-term support by
Microsoft for this aging system may be limited.
PeopleSoft Financials Online Benchmark, SQL Server 7.0 Enterprise
Edition and Windows 2000 Advanced Server on Compaq

Anda mungkin juga menyukai