1

The LA Fox Developer
A Newsletter for FoxPro Application Developers in Southern California
Visit our WebSite at: http://www.mesllc.com/lafox.html
November 1997
An Introduction to Microsoft
Transaction Server
by Gaiy DeWitt

At DevCon ‘97 Microsoft made quite a big deal about Microsoft
Transaction Server (MTS) and the support for it in Tahoe, the
next version of Visual FoxPro. Lots of VFP developers were
nonpiussed, wondering what the big deal was. To see why it can
be a big deal, consider an example using bank accounts.
Assume a three-tier, object-oriented approach.

One object is the Account. In the real world you can deposit
money into an account at any time. You may withdraw money
at any time as long as you are not attempting to withdraw more
than the balance. So I create an object to handle an account. It
has two public methods: Deposit() and Withdraw(). Those
methods are wrapped in a transaction because we need 100%
reliability in case of disconnects, crashes, etc. In addition, the
Withdraw() method can fail if the amount being withdrawn is
greater than the baance. This is an easy thing to wrap in
transaction as the database can have a rule that the balance
cannot be less than 0. Note that this is a database constraint,
not a business rule. So we start a transaction and commit the
record. The transaction fails because of the rule violation so we
rollback the transaction and report to the front end. Not too hard
so far.

Now let’s complicate the scenario. What about transferring
money from one account to another? This requires depositing in
one account and withdrawing from another. Both transactions
must succeed or both must fail. The money must go directly
from one account to another with no in-between state. There
cannot be a state where money has been withdrawn from one
account but not deposited in the other. Can I use my existing
Account objects, one depositing and one withdrawing? Maybe.
But chances are I have to rewrite them to handle multiple
transactions. Because each individual account’s transaction
must be wrapped in the transfer transaction. So if A.Withdraw()
succeeds, but B.Deposit() fails I have to roll back A. To do this
in VFP requires quite a bit of logic to determine the nesting level
of transactions.

(Con't, page 7)

In this issue
SQL Views in VFP
FoxPro Q&A
VFP Conversion Tips
At LA Fox

November 17, 1997, 7:30 PM - Rick Strahl. Rick is President
of West Wind Technologies, a company providing Internet-based
application development using Visual FoxPro. Rick has been
extensively involved in Web-based application development, and
is author of Web Connection for Visual FoxPro, a tool that
allows Visual FoxPro to be used as the back-end to build Web
applications. Rick is frequently published in FoxPro-related
magazines and bociks.

December 15, 1997, 7:30 PM - Annual LA Fox Christmas
Party. It’s coming up on that time of the year again. We’ll be
having a White Elephant Gift Exchange again this year. As
always, there’ll be plenty of tasty treats along with good cheer
and fellowship. And a special guest. For complete details,
except for the special guest, see the article on page 9.

January 19, 1998, 7:30 PM - Les Pinter. While working on a
Ph.D. in economics at Rice University in Houston, Texas, Les
joined with two high-school friends to develop the Magic Wand,
one of the first word processing programs for microcomputers.
In 1990 he sold the source code to Microsoft, which used it in
the development of Microsoft Word. During the development of a
dBase Ill application for LucasFilm, Les discovered that
FoxBase ran his applications 7 times faster, and was
immedately hooked on Fox. He began The Pinter FoxPro Letter,
(now in its eighth year) a newsletter published both in the US
and in Moscow (a Russian language edition).Les has written 6
books on programming in FoxPro for McGraw-Hill. He is a
Contributing Editor for Point DBF, the French data base maga-
zine, a technical editor for IDG books, and writes “The Cutting
(Con’t, page 2)

Page 3
Page 4
Page 8
...and much more
Out and About
by Barry R. Lee
The November meeting of LA Fox will be
held on Nov.17, 1997, at 7:30 PM at our
regular meeting place (the Torrance Airport,
3301 Airport Drive, in Torrance). For details
on how to get there, see the map on the back
page.

1