A
arthernan
For some strange reason, which has the hairs of a bug. I created a new
column on a DataTable which I first had placed in my dataset from the
server explorer table. After I finished I realized that unknowingly I
had added a unique key with it (maybe a UI problem in .NET) So I took
out the key.
Now even when the unique key is nowwhere to be found in my proyect I
get a "Column 'EDP_BLOCKED_STAYS' is constrained to be unique. Value
'4' is already present." error when trying to add the record to my
datatable.
I did a find in files on the entire project for my new column
"EDP_BLOCKED_STAYS" and I did not find any references to it being a Key
plus it's not indicated visually either. And when I did the same
looking for "Constraint" I found all the unique keys I expected to see.
I include my find results just in case; note that EVENT_DAY_PLANNING is
the table that has the new "unique" column.
The only thing special about my project is that the DataSet is in a
Library Proyect. And all other DB acceses throught that same DataSet
are working.
Find all "Constraint", Subfolders, Find Results 1, "Current Project"
<xs:unique name="Constraint1" msdatarimaryKey="true">
<xs:unique name="EVENT_DAY_PLANNING_Constraint1"
msdata:ConstraintName="Constraint1">
<xs:unique name="LOCATION_Constraint1"
msdata:ConstraintName="Constraint1" msdatarimaryKey="true">
Me.EnforceConstraints = ds.EnforceConstraints
Me.EnforceConstraints = ds.EnforceConstraints
Me.EnforceConstraints = true
Me.Constraints.Add(New System.Data.UniqueConstraint("Constraint1",
New System.Data.DataColumn() {Me.columnEVE_RID}, true))
Me.Constraints.Add(New System.Data.UniqueConstraint("Constraint1",
New System.Data.DataColumn() {Me.columnEDP_EVE_RID, Me.columnEDP_DAY},
false))
Me.Constraints.Add(New System.Data.UniqueConstraint("Constraint1",
New System.Data.DataColumn() {Me.columnLOC_RID}, true))
Matching lines: 9 Matching files: 2 Total files searched: 14
column on a DataTable which I first had placed in my dataset from the
server explorer table. After I finished I realized that unknowingly I
had added a unique key with it (maybe a UI problem in .NET) So I took
out the key.
Now even when the unique key is nowwhere to be found in my proyect I
get a "Column 'EDP_BLOCKED_STAYS' is constrained to be unique. Value
'4' is already present." error when trying to add the record to my
datatable.
I did a find in files on the entire project for my new column
"EDP_BLOCKED_STAYS" and I did not find any references to it being a Key
plus it's not indicated visually either. And when I did the same
looking for "Constraint" I found all the unique keys I expected to see.
I include my find results just in case; note that EVENT_DAY_PLANNING is
the table that has the new "unique" column.
The only thing special about my project is that the DataSet is in a
Library Proyect. And all other DB acceses throught that same DataSet
are working.
Find all "Constraint", Subfolders, Find Results 1, "Current Project"
<xs:unique name="Constraint1" msdatarimaryKey="true">
<xs:unique name="EVENT_DAY_PLANNING_Constraint1"
msdata:ConstraintName="Constraint1">
<xs:unique name="LOCATION_Constraint1"
msdata:ConstraintName="Constraint1" msdatarimaryKey="true">
Me.EnforceConstraints = ds.EnforceConstraints
Me.EnforceConstraints = ds.EnforceConstraints
Me.EnforceConstraints = true
Me.Constraints.Add(New System.Data.UniqueConstraint("Constraint1",
New System.Data.DataColumn() {Me.columnEVE_RID}, true))
Me.Constraints.Add(New System.Data.UniqueConstraint("Constraint1",
New System.Data.DataColumn() {Me.columnEDP_EVE_RID, Me.columnEDP_DAY},
false))
Me.Constraints.Add(New System.Data.UniqueConstraint("Constraint1",
New System.Data.DataColumn() {Me.columnLOC_RID}, true))
Matching lines: 9 Matching files: 2 Total files searched: 14