Update sql unique key with sqldataadapter

venerdì 14 novembre 2003 - 14.50

Luudt Profilo | Newbie

Hi,
i pray you to help me because i have a problem with a project that should be ready today.
I got a typed dataset of data from a Sql server and i binded them on a grid, then if the user edit the grid all changes will be sent back throw dataadapter.update.
The problem is that there is a unique key with three records and if the user edit it switching values in the following way:

original-Intermediate editing final result
a ax ax ax ax b
b b bx bx c c
c c c a a a

The typed dataset will let him this editing but then when it'll update obviusly the sql server'll give back instead an error about attemptig of writing an already present unique key

How can i update avoiding this error?
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5