Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help on indexing on buffered cursor w/o saving modified
Message
From
11/03/2006 08:14:10
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
11/03/2006 07:15:08
Kay Alexander
Pennsylvania Farm Bureau
Pennsylvania, United States
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Novell 6.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01103366
Message ID:
01103371
Views:
10
Hi Kay

>I have two grids on a form. One grid (GRID1) shows all family in a household and the other grid (GRID2) shows a listing of phone numbers for a family member selected in GRID1.
>
>Each time, a different family member is selected from GRID1, I need to update GRID2 with an index file with filtering on family increment to display a proper phone listing.
>
>Ex> INDEX ON STR(tiMTPmbrno)+STR(ttMTPnincr)+STR(ttMTPtincr) TAG idx_MTP OF cdxPhonebook FOR tiMTPmbrno>0 AND ttMTPnincr=gttMNMnincr UNIQUE
>

Building an index to filter is the wrong way to go. Create the index
INDEX ON STR(tiMTPmbrno)+STR(ttMTPnincr)+STR(ttMTPtincr) TAG idx_MTP OF cdxPhonebook
without the FOR condition and leave it on the table. Don't add the UNIQUE. If there are multiple phone records you should show them so they can be fixed.

>For that, each time I select a different family member in GRID1, I am executing TABLEUPDATE to update modified phone record. Otherwise, I was getting an error message “Table buffer for alias ‘curPhonebook’ contains uncommitted changes”.
>
>I really like to find a way to save the modified phone information when I am finish working with that particular family and move on the next set of family. If any one has any recommendation on how I can address this situation, I will be very grateful.

Then as the user moves from person to person, use SET FILTER or SET KEY on the phone table. This will allow you to delay the save until the user is finished with the form.
Previous
Reply
Map
View

Click here to load this message in the networking platform