5 |
The LA Fox Developer Newsletter
March 1999
Primary Keys
(Con’t from page 1)
numeric, it really only handles those data
types
at
present. It is
up to me to ensure that it will work properly when called for a
particular primary key (and I really won’t be using it that much,
so this burden is not too great). It’s very new code and probably
will require some refining before I fully implement it. It’s pre-
sented here as an option to the previously mentioned solution of
using a conditional index. I’d appreciate any comments or
improvements that you might offer.
My delete method accepts two parameters, MyPKTag and
MyPKExpr. MyPKTag is the name of the tag that is the primary
key. MyPKExpr is the name of the field that the tag is based
on. The GetFId Len function just returns the integer length a
numeric value. The following code goes right after you have
determined that the record was successfully deleted (the record
pointer is now on another record in my situation):
*
Should we reset the primary key’s value?
if
type(’MyPKTag’)
=
‘C’ and not empty(MyPKTag)
NewRec
=
recno() && Rec the ptr is on after delete
**
This is not the deleted record
set order to (MyPKTag)
Done
=
.f.
do while not Done
do case
case type(MyPKExpr)
=
‘C’
NewPKVal
=
sys(2015)
if len(&MyPKExpr) < 10
NewPKVal=right(NewPKVal,len(&MyPKExpr))
endif
case type(MyPKExpr)
=
‘N’
if type(’NewPKVal’)
=
‘U’
FIdLen
=
thisform.GetFldLen(MyPKExpr)
NewPKVal
=
val(replicate(’9’, FIdLen))
else
NewPKVaI
=
NewPKVal -1
endif
endcase
seek NewPKVaI
Done
=
not found()
enddo
go DeletedRec && Record number of deleted record
replace &MyPKExpr with NewPKVaI
if CursorGetProp(”Buffering”)> I
tableupdate(.f.)
endif
go NewRec
endif
(Ed. Note: You can visit the Atlanta FoxPro Users Group by
pointing your bro wserto http://www.afug.com)
Join
LA Fox
Microsoft Announcements
from My e-Mail
MICROSOFT DEVELOPER TECHNOLOGY TOUR ‘99
Microsoft Office 2000 Developer. Go farther with a jump start.
Microsoft Corporation invites you to attend the Developer
Technology Tour ‘99 coming this spring to your local user group.
This 14-city North American tour comes to the Anaheim Hilton
on May 11. Microsoft will demonstrate how to build real busi-
ness solutions quickly using the applications you use every
day, including Microsoft Office 2000.
Product managers from Microsoft’s corporate campus in
Redmond will demonstrate the newest developer features in
Microsoft Office 2000. You’ll also see how to take advantage of
the tools in Microsoft Office 2000 Developer to increase produc-
tivity, deliver corporate data to the desktop, and simplify man-
agement and deployment.
As a bonus, you’ll also get a preview of the latest third party
VBA enabled applications that work with Office 2000 Developer
to make it easy to integrate custom functionality into your
solutions. This event is a must for any developer seeking to
create custom solutions with VBA.
This meeting is free and open to the public. Please plan to arrive
early as seating is limited. The first 100 attendees will receive a
beta 3 copy of Windows2000. In addition, all attendees will
receive a TechTour T-shirt, 3 month subscription to Microsoft
Office & Visual Basic for Applications Developer magazine, and
participation in our
software raffle. Presented in cooperation with
the Orange County
Visual Basic Users Group
<http://
www.ocvbug.org/>.
http://msdn.microsoft.com/developer/usergroup/techtour
WINDOWS
UPDATE FOR YEAR 2000
Windows Update is the online extension of Windows 98 that
helps you get the most out of your computer. Minor year 2000
(Y2K) issues have been identified and fixed
in the Microsoft
Windows 98 operating system. We recommend that all users
update their current version of Windows 98 by visiting the
Windows Update Web site
.
Also, please refer to the Windows
98 Y2K Product Guide for details and recommendations to
address known issues. For more information, visit: http://
windowsupdate. microsoft.com/.
(FOR CORPORATE IT MANAGERS.. .The Windows
Update
Team is pleased to announce the launch of a new download site
specifically for you. In response to requests for a central
download location for Win98
bits
we have created a site which
allows Corporate IT managers to download Critical Updates for
Windows 98 in a redistributal form. Visit http://microsoft.com/
windows98/downloads/corporate.asp)
GET
OFFICE 97 TODAY AND RECEIVE OFFICE 2000 FREE*
If you purchase Office
97
between January 1,
1999 and July 31,
(Con't, page 8)
Page 5
|
5 |