Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating a table from a moverbox
Message
De
24/10/2008 09:53:39
 
 
À
24/10/2008 08:31:19
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01356849
Message ID:
01356897
Vues:
20
>Got a moverbox where the left side (all items) is populated from a table. The left side contains what has been selected and is populated from a second table that contains the selected items. Then the user can move things between the two sides and when they are done, a cursor of the selected items is created. Populating the lists when the user comes into the form is easy. Moving items between the left and right sides is easy. My problem is how to update the second table that contains the selected items from the cursor. Sounds simple, but the issue is that there could be a set of records already in the table, but now different than the cursor. I need to scan through the cursor and look for a record in the table, then add it if it doesn't exist, but how do I handle ones that are in the table, but are not in the cursor? I guess I could delete everything and just append from the cursor, but that seems sort of heavy-handed.

Similarly go through the table and, if a matching rec doesn't exist in the cursor, then you've deleted it from the cursor, so it shouldn't be in the table, so delete it from the table.
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform