T
Tom Overton
I am trying to do a very simple update to a table and it works fine
for one column (ins_type column) but not the other column (status
column). Both are char type columns. Here is the code and the
resulting SQL:
var t = db.tblins_infos.Single(i => i.info_id == tertiary_info_id);
t.status = 'A';
t.ins_type = 'P';
db.SubmitChanges();
UPDATE [dbo].[tblins_info]
SET [ins_type] = @p1
WHERE [info_id] = @p0
-- @p0: Input Int (Size = 0; Prec = 0; Scale = 0) [29475]
-- @p1: Input Char (Size = 1; Prec = 0; Scale = 0) [P]
-- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build:
3.5.30729.1
As you can see it ignored the [status] column update and only updated
the [ins_type] column. If I try to only update the status column
SubmitChanges() doesn't even generate an update statement at all.
Is there something wrong with updating a table that has a column name
of "status"?
-Tom
for one column (ins_type column) but not the other column (status
column). Both are char type columns. Here is the code and the
resulting SQL:
var t = db.tblins_infos.Single(i => i.info_id == tertiary_info_id);
t.status = 'A';
t.ins_type = 'P';
db.SubmitChanges();
UPDATE [dbo].[tblins_info]
SET [ins_type] = @p1
WHERE [info_id] = @p0
-- @p0: Input Int (Size = 0; Prec = 0; Scale = 0) [29475]
-- @p1: Input Char (Size = 1; Prec = 0; Scale = 0) [P]
-- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build:
3.5.30729.1
As you can see it ignored the [status] column update and only updated
the [ins_type] column. If I try to only update the status column
SubmitChanges() doesn't even generate an update statement at all.
Is there something wrong with updating a table that has a column name
of "status"?
-Tom