Help  |   Contact Us  |   About Us  |   News and Events
Books, conferences, and other information about... Moving to Linux Switching to OOo Building Linux Apps Using Visual FoxPro
Buy      Download      Your Account      Catalog      Support      Conferences      Resources      Fun

What's New in Visual FoxPro 7.0
Updates/FAQ/Errata

If you have a question about the technical contents of this book, please contact the author(s). Their email address(es) can usually be found in their bios in the About the Author section at the front of the book or on the author's bio page (click on the author's name on the book's main page.


Errata:

Pg. 81-82, in the code for reverting all data, the loop to roll back all transactions should be inside the FOR loop for data sessions, as transactions are scoped to the data session.

Here’s the replacement code for the VFP 6 version:

local lnI

* Go through all forms and revert all tables in their data sessions.

for lnI = 1 to _screen.FormCount
if _screen.Forms[lnI].DataSessionID <> 1
set datasession to _screen.Forms[lnI].DataSessionID
RevertTables()
endif _screen.Forms[lnI].DataSessionID <> 1
next lnI

* Revert all cursors in the default data session.

set datasession to 1
RevertTables()

function RevertTables
local laCursors[1], ;
lnCursors, ;
lnI, ;
lcAlias

* Rollback all transactions.

do while txnlevel() > 0
rollback
enddo while txnlevel() > 0

* Revert all changes in all buffered tables.

lnCursors = aused(laCursors)
for lnI = 1 to lnCursors
lcAlias = laCursors[lnI, 1]
if cursorgetprop('Buffering', lcAlias) > 1
tablerevert(.T., lcAlias)
endif cursorgetprop('Buffering', lcAlias) > 1
next lnI
return

Here’s the replacement code for the VFP 7 version:

local laSessions[1], ;
lnI, ;
laCursors[1], ;
lnJ, ;
lcAlias

* Go through all data sessions.

for lnI = 1 to asessions(laSessions)
set datasession to laSessions[lnI]

* Rollback all transactions.

do while txnlevel() > 0
rollback
enddo while txnlevel() > 0

* Revert all changes in all buffered tables.

for lnJ = 1 to aused(laCursors)
lcAlias = laCursors[lnJ, 1]
if cursorgetprop('Buffering', lcAlias) > 1
tablerevert(.T., lcAlias)
endif cursorgetprop('Buffering', lcAlias) > 1
next lnJ
next lnI

Pg. 111, in the section "Objects collection," it states that the Objects collection has Count and Item properties. In fact, while the _VFP Objects collection has both, the Objects collection for VFP's native container objects doesn't expose the Item keyword, and members of the collection can be accessed only by indexing the Objects collection itself, like this:

oSomeContainer.Objects[ nSomeMember ]

Pg. 172, in the second paragraph of "Specifying read-only and write-only properties," there's a reference to "a PropertyLet() method." It should say "a PropertySet()" method.

Additions:

This list contains changes in VFP 7 that aren't documented in the book.

PACK

The PACK command now accepts the name of a table and packs that table. While it does open the table behind the scenes to do its work, it closes it afterward. The table must be available for exclusive access.

The other forms of the PACK command, PACK DBF and PACK MEMO, also accept a table name.

Table Designer

The dropdown for index type on the Indexes page of the Table Designer no longer includes "Unique" as one of the options. Only primary, candidate, and regular indexes can be created there.