Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Latest Date Record
Message
De
20/05/2017 17:00:40
 
 
À
20/05/2017 08:41:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01651259
Message ID:
01651264
Vues:
62
>The max searches a user can have is (4), so when the user tries to search a 5th time, i want to grab the record with the latest search date and simply replace the search name, desc fields as well as update the search_date field with the new system date.

That would be call recycling. This happens from time to time and I actually do some of that on various projects.

To ease things up, I would suggest you add an integer field for a primary key, to recognize the user, so it would be better and faster to locate the related records for that user, and act accordingly.

Then, I would add a primary key field.

Basically, the oldest primary key would then be your flag, for the four related records of the related user, to update the information to save the most recent search criteria.

The following would then be recommended:

1. Add a member pimary key field
2. If not needed anymore, you could remove the name field (you might have to update all records for this new structure)
3. Add a primary key field
4. Update the primary key field in sequence from the oldest record
5. When a search is done, select the records for the user
6. If 4 records are found, from those four records, use the oldest one, and replace the record with the most recent search criteria
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform