creating multi field key in c# csharp sql server express 2005 .net
Posted on 2009-03-31
Just started using MS SQL Server 2005 Express, I got a table with 4 fields. This table has no primary key, but 3 of the columns could "come together" and make a key.
In MS Access, I would simply select the multiple fields in design view, and click the 'Key' button and viola. In C# Visual 2005 SQL Designer, I can select the 3 fields, and then create a key that allows unique only records.
The thing is, if a value repeats in the same field but in different records, then I can't commit the record, even though the other 2 of 3 columns that make the key are different.
Therefore, I'm probably not defining the key based on the 3 fields correctly?!
How do I do it? Please help... thanks!