Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scan Misbehavior
Message
From
06/05/2008 04:50:49
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01315117
Message ID:
01315259
Views:
26
>The following code is simple and straighforward, but when I do the replace statement, the last record in cursor is updated instead of the first, and the scan terminates. I've never seen this before. Any clues?
>
>Scan
> lcProject = Alltrim(Project)
> If Seek(lcProject, "bond", "proj")
> liBond = bond.ky
> Replace bondky With liBond In curRedemptions
> Endif
>Endscan

It would happen if you're scanning in curRedemptions and index on bondky is active. You could instead do a single replace w/o scan/endscan:

replace bondky with bond.ky for seek(alltrim(Project),'bond','proj')

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform