Issue Details (XML | Word | Printable)

Key: DNET-714
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Assignee: Jiri Cincura
Reporter: Scot Lunsford
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
.NET Data provider

DbUpdateConcurrencyException is not thrown when expected

Created: 09/Nov/16 03:20 AM   Updated: 13/Jul/17 10:13 AM
Component/s: ADO.NET Provider, Entity Framework
Affects Version/s: 5.5.0.0
Fix Version/s: None

Environment: FB3, .NET 4.6.2, Win7 64, EF6.1.3
Issue Links:
Duplicate
 


 Description  « Hide
The following sql is executed for an update. The SQL looks correct. But it doesn't detect that the update failed because another user edited the same row. Instead it throw the DbUpdateException because the returned CreateUser value is null.

FirebirdSql.Data.FirebirdClient Information: 0 : Command:
EXECUTE BLOCK (
p0 BLOB SUB_TYPE TEXT = @p0, p1 BIGINT = @p1, p2 CHAR(16) CHARACTER SET OCTETS = @p2
) RETURNS (
"CREATEUSER" VARCHAR(31), "MODUSER" VARCHAR(31), "CREATEDATE" TIMESTAMP, "MODDATE" TIMESTAMP, "ROWVERSION" CHAR(16) CHARACTER SET OCTETS)
AS BEGIN
UPDATE "SCENARIO"
SET "DESCRIPTION" = :p0
WHERE (("SCENARIOID" = :p1) AND ("ROWVERSION" = :p2))
RETURNING "CREATEUSER", "MODUSER", "CREATEDATE", "MODDATE", "ROWVERSION" INTO :"CREATEUSER", :"MODUSER", :"CREATEDATE", :"MODDATE", :"ROWVERSION";
SUSPEND;
END

Parameters:
Name:@p0 Type:Text Used Value:This scenario was edit testing again
Name:@p1 Type:BigInt Used Value:1032
Name:@p2 Type:Guid Used Value:0b5f7468-0580-a347-b2f0-6214478f2d8c

Exception thrown: 'System.Data.Entity.Infrastructure.DbUpdateException' in EntityFramework.dll
A null store-generated value was returned for a non-nullable member 'CREATEUSER' of type 'CAG.DBManager.DataLayer.Models.SCENARIO'.
Exception thrown: 'System.Data.Entity.Infrastructure.DbUpdateException' in DataLayer.dll

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.