Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RYO Foreign Constrains with Cascade
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01537116
Message ID:
01537130
Views:
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.
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform