Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DbUpdateConcurrencyException is not thrown when expected [DNET714] #664

Closed
firebird-automations opened this issue Nov 9, 2016 · 2 comments

Comments

@firebird-automations
Copy link

Submitted by: Scot Lunsford (scotlunsford)

Duplicates DNET738

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

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Link: This issue duplicates DNET738 [ DNET738 ]

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => Closed [ 6 ]

resolution: Duplicate [ 3 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants