I would set this in SQL Server; you are creating a combo or multi part key.  
Not two separate keys, but a single key with two or more fields in it.

And then, yes an error would be thrown if any operation ever tried to insert or 
update a record creating one that has the same values for all the fields in the 
key as another record.  This is what one would want if they don't want the 
record duplicated ever.


--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning

....-----Original Message-----
....From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED]
....Sent: Thursday, July 14, 2005 2:56 PM
....To: CF-Talk
....Subject: 2 Primary Keys
....
....Hi guys,
....
....I want to add a row in a join table which i don't want to be
....duplicated ever.
....
....So i have my tableID, table1ID, table2ID - if table1ID = 24 and
....table2ID = 35 i don't want there to ever be a reoccurence of them.  I
....guess i have to set both of those fields (table1ID, table2ID) to
....primary keys, but how can i do that?  Do i do it in ms-sql or via
....Coldfusion somehow?  If i do it via MS-SQL then won't it pop an error
....up in the code if it happens?
....
....Thanks,
....
....Saturday
....
....
....
....
....

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211930
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to