Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referential Integrity & Insert
Message
From
24/01/1999 16:21:32
 
 
To
23/01/1999 22:15:05
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00179374
Message ID:
00179623
Views:
25
>Is this a bad design practice.... to simply add the (0) to the first field. You offered other solutions that I didn't attempt to do. This seemed to be the path of least resistance!
>

IMHO, this is the way to go. You are making sure that no BAD data is getting into the table, and at the same time not enforcing tat the data be present (if it is not known for example).

>Do you feel this will be ok, or should I take your advice and use "code", to >allow me to append records without getting the trigger failure (assuming I am >restricting on the insert tab of the referential integrity builder)?

What I meant by using code is enforcing your rules via code. This means only allowing data to get into the nTitleID field from a list box that contains all existing relateable records.

How you handle this just depends on your needs- do you trust yourself as a data entry person? Do you feel that you know the rules and when they can be broken?


>That would be an undertaking in itself. It took me 3 weeks to learn how to auto-generate primary keys with a stored proceedure and a keylist table!!


I feel for you. Some things in VFP are very awkward to get started on learning. It seems you have learned a valuable lesson though- ask somebody. I have a feeling that you would not have had to spend three days on that routine if you would have known that a very functional example of that very thing can be found in the Tastrade sample that ships with VFP.

Even if it had not though, you have enough expertise available here at your fingertips, that omst of us have crafter routines similar in form and identical in function to the one you put together. I sggest that next time, before you invest so much time in a commonly needed routine, that you ask if it has been done, and feel no shame about starting with someone else's code.


>
>Thank you very much for your response. I don't know what I would do without the help of people like yourself on this site!


Glad I could help.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform