Information générale
Catégorie:
Codage, syntaxe et commandes
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement