8 |
The LA Fox Developer Newsletter
Multi-User
(Con't from page 1)
see if the name (since we did not change that field) on the
record on disk is different than what is in our buffer. We see that
the record on disk says “Mary Smith” and that our buffer says
“John Smith”. Since they are different then we change our buffer
to match what is on disk. Now, our buffer says name
=
Mary
Smith” and phone number
=
“555-1111”. Now, when we save our
buffer to the record on disk, it contains our change (to the phone
number) plus the change (to the name) that someone else
made.
Here is the program that does that comparison.
a
Note: This method assumes that the table to
*_
be updated is the currently selected table
*_
and that the table is using buffer mode 5
*_
(table buffering).
*_
This method
will
merge any changes we have
made (in our buffered table) with any changes
another user has made since we buffered the
*_
table.
*_
Written 29 March 2000 by Charlie Parker
—
Fowler Software Design
If eof()
InHere = 0
else
InHere = recno()
endif
Since we are using table buffering, then
multiple records may have been modified.
Get the first (if any) modified record in the buffer.
InRecNo = getnextmodified(0)
InCount = 0
if InRecNo <> 0
*_ Make a list of the record numbers for the
*_ records In the buffer we have modified.
Note: Since we will be updating our buffer
with the current values in the table (for
the fields we have NOT changed), then we
need to store the list of records we have
modified BEFORE we start updating the buffer.
do
while lnRecNo <> 0
InCount = inCount + I
dimension laRecNo(InCountj
laRecNo[lnCount] = InRecNo
lnRecNo = getnextmodified(lnRecNo)
çCon~, page 9)
May 2000
local InHere, lnRecNo, inCount, lnEach,lnFieldNum, 110K, lcField
local array laRecNo(1]
110K
=
.T.
We will be moving the record pointer, so
*_
save where we are now so we can get back
*_
to the same record.
NEW VISUAL FOXPRO COURSE
AVAILABLE
Micro Endeavors who has been recognized by Microsoft as one
of the top three worldwide leaders in Certified Technical Educa-
tion Training, has released their new Mastering Microsoft Visual
FoxPro Development course (ME612).
This 5-day course will teach students how to create multi-user
database applications using Visual FoxPro 6.0. Upon comple-
tion of the course, the student will be able to:
Write a Visual FoxPro application that accesses data from
either Visual FoxPro or SQL Server databases
• Use Visual FoxPro to access and create component object
model (COM) components.
Integrate ActiveX controls into Visual FoxPro applications
Handle various deployment scenarios for Visual FoxPr
applications
Further, this course will help the student prepare for Exam 70-
156, Designing and Implementing a Desktop Application with
Visual FoxPro 6.0.
Topics Include:
§
Visual FoxPro Essentials
§
Building an Application Framework
§
Multi-User constructs
§
Implementing Data Buffering
§
Building Data Entry Forms
§
Deleting and Adding Records
§
Using ActiveX Controls
§
Accessing Remote Data
§
Using COM Components
§
Building COM Components
§
Optimizing and Deploying Applications
*This is a great class for prior MEl VF students interested in the
new cert exam, this class is not for people new to VFP.
Call 800.331.9434 or email georged~microendeavors.com for
course dates or to register
Page 8
|
8 |