S
shapper
Hello,
I am creating a table has follows:
create table dbo.Tags
(
TagID uniqueidentifier not null
default NewID()
constraint PK_Tag primary key clustered,
TagText nvarchar(100) not null
)
I am using a LinqDataSource and a ListView to create records in this
table. I am able to delete and update records but when I insert a
record I get the error:
Violation of PRIMARY KEY constraint 'PK_Tag'. Cannot insert duplicate
key in object 'dbo.Tags'. The statement has been terminated.
In fact I am able to insert ONE record and its ID becomes:
00000000-0000-0000-0000-000000000000
So when I insert a second one, I suppose, the ID is 000... again and
this is why I get the error ...
What am I doing wrong?
Thanks,
Miguel
I am creating a table has follows:
create table dbo.Tags
(
TagID uniqueidentifier not null
default NewID()
constraint PK_Tag primary key clustered,
TagText nvarchar(100) not null
)
I am using a LinqDataSource and a ListView to create records in this
table. I am able to delete and update records but when I insert a
record I get the error:
Violation of PRIMARY KEY constraint 'PK_Tag'. Cannot insert duplicate
key in object 'dbo.Tags'. The statement has been terminated.
In fact I am able to insert ONE record and its ID becomes:
00000000-0000-0000-0000-000000000000
So when I insert a second one, I suppose, the ID is 000... again and
this is why I get the error ...
What am I doing wrong?
Thanks,
Miguel