Hi,
I am using System.Data.IDbCommand to query a table that has a primary key. My query joins it with other tables and fetches me multiple records with the same value in the primary key column but different values in other joined columns and this is the intended behaviour.
However, IDbCommand.ExecuteReader().GetSchemaTable() shows that the reader's internal schema table has a primary key on that column. Now, if I try to load this reader into a System.Data.DataTable (plain old DataTable, not typed), it throws a constraint violation exception (obviously because it is trying to insert the same value for the primary key column).
Is there a way I can instruct ExecuteReader() to ignore the source schema or not enforce the constraints?
Other information: This is .Net 2.0.
Thanks in advance