How to over come from deadlock in embedded SQL through C# in SQL Server 2014? -



How to over come from deadlock in embedded SQL through C# in SQL Server 2014? -

i facing deadlock problem on dispatching.packagetrace table when below embedded sql invoked through c# programming language in ms sql server 2014.

below table design in database:

create table [dispatching].[packagetrace]( [packageid] [uniqueidentifier] rowguidcol not null, [partitionid] [numeric](26, 0) null, [conduit] [nvarchar](255) not null, primary key clustered ( [packageid] asc ) go set ansi_padding off go alter table [dispatching].[packagetrace] add together default (getdate()) [datecreated] go

below embedded sql invoked through c# programming language in ms sql server 2014:

if exists(select * dispatching.packagetrace packageid = 'klaslndsskok230m') begin update [dispatching].[packagetrace] set [conduit] = @conduit [packageid] = 'klaslndsskok230m' end else begin insert [dispatching].[packagetrace] ([packageid] ,[partitionid] ,[conduit] values (@packageid, @partitionid, @conduit) end

suggestions appreciated overcome deadlock.

thank in advance. --raj

c# database-deadlocks sql-server-2014 embedded-sql

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -