Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with deleting records
Message
De
10/03/2003 16:47:36
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
10/03/2003 15:03:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00763611
Message ID:
00763941
Vues:
18
>When I click on a date, and then time, all of the information is added to the table, permanently.
>
>This is why the table needs a (date + time) as the primary key. Now the user has told me that often a booking is made and then soon before use, is cancelled, and another person then makes a booking for that facility at that time.

>I'm sorry if this problem is a bit soft, but I have only recently started using VFP and this is my first project.

Since you're new, now's the time to learn some good habits. PK's shouldn't be entered by the user, although there are exceptions.

The date+time+room (or whatever) should not be your primary key. When a booking is canceled you should leave the record and clear out the values such as who has the room. When someone comes along to book the time/room slot again, search for the pre-existing record and ask if they want to reserve the spot, otherwise add a new record for their reservation. Another way is to delete the record and then recall it if the time/room slot is to be refilled.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform