3

The LA Fox Developer Newsletter
June 1999
Levy Joins DataChannel (Con’t from page 1)
DataChannel was founded in 1996 by Dave Pool. Ten years ago,
he started a company called Spry. Spry developed a software
product Internet In A Box that made it easy for people to go
online. In 1995 he sold the company for $102 million. To see
some background information on DataChannel’s founder Dave
Pool along with a four minute video clip of how he runs the
company, go to: http://www.msnbc.com/local/KING/254456. asp.

My title at DataChannel will be Senior Architect. As for my role
at DataChannel without the details, I will be part of
DataChannel’s architecture department working directly for
DataChannel CTO (Chief Technology Officer) Norbert Mikula.
Norbert developed one of the first XML parsers (NXP) and has
been actively involved in XML- related efforts since the early
days of this standard. He has been actively involved with
industry initiatives and working groups such as XML-EDI, the
W3C XML working group and the W3C Extensible Style Sheet
Language working group. Norbert also serves as CTO on the
board of directors of OASIS (http://www..oasis-open.org), the
Organization for the Advancement of Structured Information
Standards, which is an international consortium dedicated to
accelerating the adoption of product-independent formats based
on public standards. He is also the author of numerous articles,
whitepapers and books including XML for Dummies. For more
information about Norbert, go to: http://www.datachannel.com/
news/pr_norbert.shtml.

Hopefully this detailed message helps clarify my current
activities and will minimize questions about my new position.
And just in case you don’t already know, VFP 6.0 SP3 was just
released and it’s a really great update. Information on SP3 and
many other VFP resources can be found at: http://
msdn.microsoft. com/vfoxpro/.
Ken Levy
http://classx.com

A Little Humor
A pregnant woman from Washington, D.C. gets in a car acci-
dent and falls into a deep coma. Asleep for nearly 6 months,
when she wakes up she sees that she is no longer pregnant
and frantically asks the doctor about her baby.

The doctor replies, “Ma’am you had twins! a boy and a girl. Your
brother from Maryland came in and named them.” The woman
thinks to herself, “No, not my brother... he’s an idiot!”

She asks the doctor, “Well, what’s the girl’s name?”

“Denise.

“Wow, that’s not a bad name, like it! What’s the boy’s name?”

"Denephew."
VFPCOM.DLL Released
By Jim Slater
VP Rocky Mountain FoxPro Users Group
A new enhancementto VFP 6.0, vfpcom.dll, is now available for
download on the VFP Web site at http://msdn.microsoft.com/
vfoxpro/downloads/readme_ VFPCOM. asp . This COM server
extends VFP’s functionality in two areas.

First is the ability to convert VFP cursors to ADO recordsets
(the .CursorToRS( ) method), and ADO recordsets to VFP
cursors (the .RSToCursor( ) method). Microsoft has stated that
the future of data access in MS products is ADO and OLEDB
(at least until they invent some new acronyms!). VFP develop-
ers new to ADO should feel at home in no time, since ADO
techniques for accessing and updating data parallel those
available natively within VFP.

As we all know, however, no other language matches VFP’s
ability to manipulate data. Vfpcom.dll allows us to create
cursors using the full power of VFP, then convert them to ADO
recordsets in a flash with a single method call. Ken Levy
provided a VFP-to-ADO conversion utility several months ago at
his web site www.classx.com . This new component repackages
his ideas into a Microsoft-supplied component that runs at the
C++ speed of a .dll.

In addition to ADO conversion, vfpcom.dll provides us with an
event-binding capability previously unavailable in VFP. When
designing a COM server, the programmer may wish to alert the
host application when a certain event has occurred. For ex-
ample, ADO supports the following methods to notify the host
that data has been retrieved or changed: Fetch Progress,
FetchComplete, WillChangeRecord, RecordChangeComplete,
WillChangeField, FieldChangeComplete.

If the COM server made calls to specific methods in the host to
alert it of these events, it could not be used with host applica-
tions that did not include those methods. For example, VFP
does not have a RecordChangeComplete() function or method,
so an attempt by a COM server to do something like
“oHost.RecordChangeComplete~” would generate an error.

Without knowing in advance whether a host includes a given
method, how can a COM server be designed to notify its host
when something happens? The solution is to include a “Raise
Events” capability in the COM server. This allows the compo-
nent to send out a signal saying in effect “if you are interested,
the following just happened; if you’re not, don’t bother”. Unlike a
direct method call, raising an event not supported by the host
application will not generate an error. While VFP does not allow
us to raise events, other languages such as VB and VC++ do.

Until now, VFP also was unable to respond to events raised by
COM servers. Vfpcom.dI! solves this by introducing a new
Bind Events() method. This allows us to create a VPF class with
method names identical
to one or more the COM server’s event
(Con’t, page 8)
Page 3

3