0
So you need to provide a "valid UpdateCommand". That seems clear to me. You said you don't want a primary key and I might misunderstand something but it's your data if you don't want a primary key then don't make one. Just provide a valid UpdateCommand.
0
I think you should describe your table structures how you are designing tables along with associate table in which you are facing problem so that anyone can found can there be any way to solve it?
0
I don't think it is possible to set the primary and allow for duplicate values at the same time.
So, I will not set a primary key for my table and I will need to fix this error:
Update requires a valid UpdateCommand when passed DataRow collection with modified rows.
Any suggestions????
0
I did set a primary key for my table. So now how to allow the item, which I assign the PK to, to have duplicate values.
Thanks,
Ali
0
Hi
Firstly u decalred prmary key on ur database atble . . then ur duplicasy problem might be slove . .
0
Thanks Crich. But I'm not sure I understand what you say?
0
Thanks Crich. But I'm not sure I understand what you say?
0
Thank you Mayur for your reply.
What do you mean by "fire update query through stored procedure"
0
This Folowing Example is remove duplicate rows from a table
- First, run the above GROUP BY query to determine how many sets of duplicate PK values exist, and the count of duplicates for each set.
2.Select the duplicate key values into a holding table.
SELECT col1, col2, col3=count(*) INTO holdkey FROM t1 GROUP BY col1, col2 HAVING count(*) > 1
3.SELECT DISTINCT t1.* INTO holddups FROM t1, holdkey WHERE t1.col1 = holdkey.col1 AND t1.col2 = holdkey.col2
4.
SELECT col1, col2, count(*) FROM holddups GROUP BY col1, col2
5.DELETE t1 FROM t1, holdkey WHERE t1.col1 = holdkey.col1 AND t1.col2 = holdkey.col2
6.
INSERT t1 SELECT * FROM holddups
0
I think it should have primary key without which it cant be possible but your table needs duplicate value so i think you need to fire update query through stored procedure, it might work