Jump to content

Visual FoxPro: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
RyanNerd (talk | contribs)
RyanNerd (talk | contribs)
Line 14: Line 14:
On [[March 1]], [[2006]], Microsoft released a Community Technology Preview ([[Community Technology Preview|CTP]]) of Sedna. According to the Fox team, the current plan "for releasing Service Pack 2 for VFP 9.0 will be some time in 2007, at the same time or near the same time of the release of Sedna". The most recent [http://msdn2.microsoft.com/en-us/vfoxpro/bb264582.aspx release] of Sedna [[CTP]] and SP2 [[Beta]] was in [[June]] [[2007]].
On [[March 1]], [[2006]], Microsoft released a Community Technology Preview ([[Community Technology Preview|CTP]]) of Sedna. According to the Fox team, the current plan "for releasing Service Pack 2 for VFP 9.0 will be some time in 2007, at the same time or near the same time of the release of Sedna". The most recent [http://msdn2.microsoft.com/en-us/vfoxpro/bb264582.aspx release] of Sedna [[CTP]] and SP2 [[Beta]] was in [[June]] [[2007]].


In December 2005, VFP broke into the top 20 on TIOBE's [http://www.tiobe.com/tiobe_index/index.htm Programming Community Index] for the first time. As of March 2007 it is at position 19, making it a "B" language.
In December 2005, VFP broke into the top 20 on TIOBE's [http://www.tiobe.com/tiobe_index/index.htm Programming Community Index] for the first time. In March 2007 it is at position 19, making it a "B" language. As of August 7, 2007 it dropped into position 22.


On March 13 2007<ref>[http://msdn2.microsoft.com/en-us/vfoxpro/bb308952.aspx A Message to the Community]</ref> Microsoft stated that it will not be releasing its Visual FoxPro development software past version 9.0, Microsoft will continue to support the Visual FoxPro core until 2015 with standard support through January 2010 and extended support through January 2015 via the developer tools life-cycle support plan.<ref>http://support.microsoft.com/lifecycle/?p1=7992</ref>
On March 13 2007<ref>[http://msdn2.microsoft.com/en-us/vfoxpro/bb308952.aspx A Message to the Community]</ref> Microsoft stated that it will not be releasing its Visual FoxPro development software past version 9.0, Microsoft will continue to support the Visual FoxPro core until 2015 with standard support through January 2010 and extended support through January 2015 via the developer tools life-cycle support plan.<ref>http://support.microsoft.com/lifecycle/?p1=7992</ref>

Revision as of 18:21, 7 August 2007

Visual FoxPro is a data-centric object-oriented and procedural programming language produced by Microsoft. It is derived from FoxPro (originally known as FoxBASE) which was developed by Fox Software beginning in 1984. Fox Technologies merged with Microsoft in 1992 and the software acquired further features and the prefix "Visual". The last version of FoxPro (2.6) worked under Mac OS, DOS, Windows, and Unix: Visual FoxPro 3.0, the first "Visual" version, dropped the platform support to only Mac and Windows, and later versions were Windows-only. The current version of Visual FoxPro is COM-based and Microsoft has stated that they do not intend to create a Microsoft .NET version.

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 entry.)

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.

Recent History

In late 2002, some community members 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.[1]

Rumors suggesting that Microsoft intends to end support for FoxPro have been common since Microsoft's acquisition of the product, despite the product having one of the longest support timeframes for a Microsoft product (extended support until 2015). In March 2007, Microsoft announced "that there will be no VFP 10"[2], 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 a service pack that was released December 8, 2005. At the time of the end of life announcement, work on the next release codenamed Sedna which was built on top of the VFP9 codebase had already begun. Sedna consisted mainly of Xbase components to support a number of interoperability scenarios with various Microsoft technologies including SQL Server 2005, .NET, WinFX, Windows Vista, and Office 12. Microsoft plans to release these components as community releases via the CodePlex site.

On March 1, 2006, Microsoft released a Community Technology Preview (CTP) of Sedna. According to the Fox team, the current plan "for releasing Service Pack 2 for VFP 9.0 will be some time in 2007, at the same time or near the same time of the release of Sedna". The most recent release of Sedna CTP and SP2 Beta was in June 2007.

In December 2005, VFP broke into the top 20 on TIOBE's Programming Community Index for the first time. In March 2007 it is at position 19, making it a "B" language. As of August 7, 2007 it dropped into position 22.

On March 13 2007[3] Microsoft stated that it will not be releasing its Visual FoxPro development software past version 9.0, Microsoft will continue to support the Visual FoxPro core until 2015 with standard support through January 2010 and extended support through January 2015 via the developer tools life-cycle support plan.[4]

Meanwhile, some of the FoxPro-related technology can be seen in other Microsoft products such as SQL Server, Team Foundation Server and various portions of the .Net Framework.

In late March 2007 a grassroots campaign was started by the Spanish-speaking FoxPro community at MasFoxPro (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.[5]

Version information

Operating system compatibility

Supported Windows Versions
Version VFP 3.0 VFP 5.0 VFP 6.0 VFP 7.0 VFP 8.0 VFP 9.0
Windows 3.x Yes No No No No No
Windows NT 4.0 Yes Yes Yes Yes No [6] No [7]
Windows 95 Yes Yes Yes Runtime only No [8] No
Windows 98 Yes Yes Yes Yes Runtime only Runtime only
Windows ME Yes Yes Yes Yes Runtime only Runtime only
Windows 2000 Yes Yes Yes Yes Yes Yes
Windows XP Yes Yes Yes Yes Yes Yes
Windows 2003 ? ? Yes Yes Yes Yes
Windows Vista ? See Note[9] Yes Yes Yes Yes

Information on Executable Files

VersionVERSION() returnsEXE SizeEXE Date DLL SizeDLL Name
VFP 9Visual FoxPro 09.00.0000.2412 for Windows 5,620 kb13-DEC-2004 4,600 kbVFP9R.DLL
VFP 8Visual FoxPro 08.00.0000.3117 for Windows 5,236 kb25-SEP-2003 4,200 kbVFP8R.DLL
VFP 7Visual FoxPro 07.00.0000.9465 for Windows 4,260 kb04-JAN-2002 3,344 kbVFP7R.DLL
VFP 6Visual FoxPro 06.00.8961.00 for Windows 4,091 kb18-AUG-2000 3,295 kbVFP6R.DLL
VFP 5Visual FoxPro 5.0.0.415 for Windows 4,065 kb24-JAN-1997 3,148 kbVFP500.DLL
VFP 3Visual FoxPro 03.00.00.0711 for Windows 4,374 kb16-DEC-1995 3,657 kbVFP300.ESL
FPW 2.6aFoxPro 2.6a for Windows 2,444 kb28-SEP-1994 n/an/a

Code samples

Hello World example:

MESSAGEBOX("Hello World")

Object

loForm = CREATEOBJECT("HiForm")
loForm. Show(1)

DEFINE CLASS HiForm AS Form
  AutoCenter = .T.
  Caption = "Hello, World"

  ADD OBJECT lblHi as Label WITH ;
    Caption = "Hello, World!"
ENDDEFINE
loMine = CREATEOBJECT("MyClass")
? loMine.cProp1   && This will work.
? loMine.cProp2   && Program Error: Property CPROP2 is not found.

? loMine. MyMethod1()  && This will work.
? loMine. MyMethod2()  && Program Error: Property MYMETHOD2 is not found.

DEFINE CLASS MyClass AS Custom
  cProp1 = "My Property"    && This is a public property
  HIDDEN cProp2     && This is a private (hidden) property

  PROCEDURE Init()    && Class constructor
    This.cProp2 = "This is a hidden property."
  ENDPROC

  PROCEDURE MyMethod1()   && This is a public method
    RETURN This. MyMethod2()
  ENDPROC

  HIDDEN PROCEDURE MyMethod2()  && This is a private (hidden) method
    RETURN This.cProp2
  ENDPROC
ENDDEFINE

Data handling

* Create a table
CREATE TABLE randData (iData I)

* Populate with random data using xBase and SQL DML commands
FOR i = 1 TO 50
        APPEND BLANK
        REPLACE iData WITH (RAND() * 100)

  INSERT INTO randData (iData) VALUES (RAND() * 100)
ENDFOR

* Place a structural index on the data
INDEX ON iData TAG iData
CLOSE ALL

* Display sorted data using xBase-style commands
USE randData
SET ORDER TO iData
GO TOP
LIST NEXT 10  && First 10 (end-of-line comment)
SKIP 81
LIST NEXT 10  && Last 10
CLOSE ALL

* Browse sorted data using SQL DML commands
SELECT * ;
  FROM randData ;
  ORDER BY iData DESCENDING

ODBC Access using SQL Passthrough

* Connect to an ODBC data source
LOCAL nHnd
nHnd = SQLCONNECT ("ODBCDSN", "user", "pwd")

* Execute a SQL ccommand
LOCAL nResult
nResult = SQLEXEC (nHnd, "USE master")
IF nResult < 0
  MESSAGEBOX ("MASTER database does not exist!")
ENDIF

* Retrieve data from the remote server and stores it in
* a local data cursor
nResult = SQLEXEC (nHnd, "SELECT * FROM authors", "QAUTHORS")

* Update a record in a remote table using parameters
LOCAL cAuthorID, cAuthorName
cAuthorID = "1001"
cAuthorName = "New name"
nResult = SQLEXEC (nHnd,"UPDATE authors SET auth_name = ?cAuthorName WHERE auth_id = ?cAuthorID")

* Close the connection
SQLDISCONNECT(nHnd)

Beta code names

Microsoft pages

Other pages

References

  1. ^ http://fox.wikis.com/wc.dll?Wiki~VFPandLinux
  2. ^ http://msdn2.microsoft.com/en-us/vfoxpro/bb308952.aspx
  3. ^ A Message to the Community
  4. ^ http://support.microsoft.com/lifecycle/?p1=7992
  5. ^ http://blogs.zdnet.com/microsoft/?p=361
  6. ^ - VFP8 applications are not supported but can be run under Windows NT 4.0
  7. ^ - The free patch for VFP 9.0 has been created by the German FoxPro User Group (dFPUG) and is available at the dFPUG document portal in the directory http://portal.dfpug.de/dFPUG/Dokumente/Freeware/. It allows you to run VFP 9.0 applications on NT 4.0. Microsoft has indicated that this will be addressed in VFP 9.0 SP1.
  8. ^ - The second-level menus don't work under Windows 95.
  9. ^ Functionally works, however, performance is so slow that it is not worth the effort.[citation needed]