Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Save doubles ?
Message
From
25/08/2000 11:16:39
 
 
To
25/08/2000 11:14:22
Koos Veel
Gamma Research
Aruba
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00409253
Message ID:
00409255
Views:
27
>Hello,
>
>A discussion that comes back regularly in our shop is the following:
>In a data entry form for widgets you have to enter a description and a number only. No two widgets can have the same number. When you save the entry the program must check if the widget number does not already exist.
>What would be the best code for this ? (there are two situations, 1. it is a new entry, 2. it is an edit of an existing entry).
>Anybody has wisdom here ?
>
>Thanks,

One of the quickest ways is to add a CANDIDATE key on the number field in the table. Then trap for a candidate key violation.
Insanity: Doing the same thing over and over and expecting different results.
Previous
Reply
Map
View

Click here to load this message in the networking platform