Hi,
I just tried out the following test example and no exceptions were
thrown:
DataTable table1 = new DataTable();
DataColumn[] primaryKeyCols = new DataColumn[] {new
DataColumn("Col 1"), new DataColumn("Col 2")};
table1.Columns.AddRange(primaryKeyCols);
table1.PrimaryKey = primaryKeyCols;
The result is a DataTable with one Unique Constraint between "Col 1"
and "Col 2" which is also the primary key.
Is there something I'm failing to do that your code requires?
> Hi to all,
>
[quoted text clipped - 35 lines]
> | PK int(4) dm_mod_id |
> +---------------------+
Paschalis Pagonidis - 22 Oct 2004 09:25 GMT
Hmm, the concept is the same. You create two fields,
assign them to table1 and make them primary keys.
There is something that causes the compiler to "complain".
For the moment I removed the constraint and I manage it by
hand, until I finish with the remaining code...
Thanks anyway...
>-----Original Message-----
>Hi,
[quoted text clipped - 12 lines]
>
>"Paschalis Pagonidis" <anonymous@discussions.microsoft.com> wrote in message
news:<032d01c4b747$e243ed40$a601280a@phx.gbl>...
>> Hi to all,
>>
[quoted text clipped - 36 lines]
>> +---------------------+
>.