Q
Quimbly
Preamble:
Users table:
UserID int, PK, not null
....
CultureID int, FK, null
Cultures table:
CultureID int, OK, not null
....
When updating the DB directly, I can set the CultureID column to NULL in an
SQL update:
e.g. UPDATE Users SET CultureID=NULL WHERE UserID=11
However, when I try to update using a strongly typed dataset over
webservices, I get this error:
The UPDATE statement conflicted with the FOREIGN KEY constraint
"FK_Users_Cultures". The conflict occurred in database "CentralV1_2Dev",
table "dbo.Cultures", column 'CultureID'.
Looking at the DataSet in the VS designer, the CultureID of the Users table
has the following properties:
AllowDBNull: True
DefaultValue: <DBNULL>
NullValue: (Null)
ReadOnly: False
Unique: False
Can anyone tell me why I'm getting this error and/or have any suggestions on
how I can get around it?
Users table:
UserID int, PK, not null
....
CultureID int, FK, null
Cultures table:
CultureID int, OK, not null
....
When updating the DB directly, I can set the CultureID column to NULL in an
SQL update:
e.g. UPDATE Users SET CultureID=NULL WHERE UserID=11
However, when I try to update using a strongly typed dataset over
webservices, I get this error:
The UPDATE statement conflicted with the FOREIGN KEY constraint
"FK_Users_Cultures". The conflict occurred in database "CentralV1_2Dev",
table "dbo.Cultures", column 'CultureID'.
Looking at the DataSet in the VS designer, the CultureID of the Users table
has the following properties:
AllowDBNull: True
DefaultValue: <DBNULL>
NullValue: (Null)
ReadOnly: False
Unique: False
Can anyone tell me why I'm getting this error and/or have any suggestions on
how I can get around it?