Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RYO Foreign Constrains with Cascade
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01537116
Message ID:
01537131
Vues:
27
>>>>Hi,
>>>>
>>>>I am scheduled to deliver a big project on Sunday and just hit the wall that SQL server won't allow me to set all necessary Foreign Constraints with Cascade. The reason is only the designer of SQL Server know. So I am about to start working on the Roll-Your-Own approach from the VFP application. I think I can do it (I have more that 24 hours <g>). But my questions is, does anybody else do it? Do you (or anybody) create an application with SQL server backend and create your own foreign constraints with cascades?
>>>
>>>That probably means that you have some circular logic in some of your constraints. SQL Server is picky about it, but I've never seen it be wrong.
>>>
>>>A constraint doesn't have to be cascading to be enforced. Any constraint is just that - a constraint. It will not let you violate it.
>>>
>>>My guess is you have some constraints that shouldn't really exist, but since they do they are preventing cascading constraints from being created.
>>>
>>>If you want, script your database and email it to me along with a description of what constraints are giving you problems and I can have a look at it tomorrow.
>>
>>I see what you are saying. My application enforces all constraints in code. That is, user cannot change the unique field entry in a child table if it does not exist in the parent table unique field. The constraints I was setting in the database were supposed to (for the most part) update all child tables if the parent table field (unique) has been changed by user.
>>
>>I will take you up on the offer and will send you the script. Hopefully you will be able to make sense out of my design <g>. And if you don't have time to look at it, don't feel like you have to.
>>Thank you.
>
>OK. I got your script. I'll look at it in the morning.

Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform