G
Guest
Under SQL Server 2000, a column can be defined as null and unique at the same
time. Under these circumstances, when a new row is added, uniqueness is
ensured for only non null values.
Under ADO.Net, I would like to know whether the datacolumn's unique property
mirrors that of SQL server 2000. I am trying to create a datacolumn that can
contain DBNull.Value but is unique when its values are not DBNull.Value. My
experience with the DataColumn.Unique Property is that it will check for
uniqueness regardless of whether AllowDBNull is true or not, ie if you cannot
have several DataRows with null value in this column if the DataColumn's
Unique property is set to true.
Can anyone confirm this?
time. Under these circumstances, when a new row is added, uniqueness is
ensured for only non null values.
Under ADO.Net, I would like to know whether the datacolumn's unique property
mirrors that of SQL server 2000. I am trying to create a datacolumn that can
contain DBNull.Value but is unique when its values are not DBNull.Value. My
experience with the DataColumn.Unique Property is that it will check for
uniqueness regardless of whether AllowDBNull is true or not, ie if you cannot
have several DataRows with null value in this column if the DataColumn's
Unique property is set to true.
Can anyone confirm this?