Integrety is there for a reason, ignoring it would be the same as not having it. You have to insert data in the correct order to adhere to the integrety and relationships.
ACLPrinciplePermission ACLPrincipleID ACLPermission Is the order that will not break any constraints. Russ Michaels Macromedia/Allaire Certified ColdFusion Developer Satachi Internet Development Phone: 0870 787 3610 Tech Support: 0906 9607800 FAX: 0709 2212 636 http://www.satachi.com email general: [EMAIL PROTECTED] email support: [EMAIL PROTECTED] Join our ColdFusion Developer discussion lists. Send an e-mail to [EMAIL PROTECTED] > > > -----Original Message----- > From: Justin MacCarthy [mailto:[EMAIL PROTECTED] > Sent: 12 September 2003 13:30 > To: Cfuk > Subject: [ cf-dev ] OT: SQL server constraint question > > > Hi all, > > In SQL server 7, I got the TABLES > > [ACLPrincipleID] > ACLPrincipleID [pk] [autonumber] > ACLUser > > [ACLPermission] > ACLPrincipleID [ck][fk ACLPrincipleID.ACLPrincipleID] > ACLPermissionID [ck][fk ACLPrinciplePermission.ACLPermissionID] > > > [ACLPrinciplePermission] > ACLPermissionID [pk] [autonumber] > ACLResourceID > ACLPermission > > In a stored Proc I want to add a permission for a user, but I > can't add the permissions first as it breaks the > constraint,and I can't add the record to the ACLPermission > table first because I need the ACLPermissionID that is generated. > > Is there a way to get SQL server to only check the constraint > at the end? > > I'm stuck with the [autoincrement] PK and this db design for now. > > I have some ideas I don't like too much... > What is the best way to do it? > > TIA > Justin > > > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] For human help, e-mail: > [EMAIL PROTECTED] > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] For human help, e-mail: > [EMAIL PROTECTED] > > -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
