R
Reece Laurie
Hi,
Scenario: IDS allows PK to be defined as Null-able. Our code sets the
metadata of the select command's data reader correctly by setting the IsKey
property of the PK columns to "True".
Problem. The DataTable.Load(DataReader) action with the above scenario
doesn't set the DataTable's PrimaryKey property.
I.e.
after running
DataTable.Load(Command.ExecuteReader(CommandBehavior.SchemaOnly |
CommandBehavior.KeyInfo)) with the SELECT * FROM T command where T is a
table with nullable PK, the DataTable.PrimaryKey array is empty, even though
the DataReader.GetSchemaTable() correctly shows IsKey=True for the PK
columns.
I'd like an explanation as to why they think PK is not being set. Is there
anything else that we should be setting for the PK to be set properly? If
IsKey is the only property that matters, then, since we're setting it, this
is a defect that should be fixed?
Thanks...
Scenario: IDS allows PK to be defined as Null-able. Our code sets the
metadata of the select command's data reader correctly by setting the IsKey
property of the PK columns to "True".
Problem. The DataTable.Load(DataReader) action with the above scenario
doesn't set the DataTable's PrimaryKey property.
I.e.
after running
DataTable.Load(Command.ExecuteReader(CommandBehavior.SchemaOnly |
CommandBehavior.KeyInfo)) with the SELECT * FROM T command where T is a
table with nullable PK, the DataTable.PrimaryKey array is empty, even though
the DataReader.GetSchemaTable() correctly shows IsKey=True for the PK
columns.
I'd like an explanation as to why they think PK is not being set. Is there
anything else that we should be setting for the PK to be set properly? If
IsKey is the only property that matters, then, since we're setting it, this
is a defect that should be fixed?
Thanks...