Click here to Skip to main content
15,881,089 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
im trying to update and existing record by set value1=@value1 where value1 = value1
but its not working
Posted
Comments
Mohd. Mukhtar 8-Oct-12 5:23am    
Are you want to update primary key value?
mrDivan 8-Oct-12 5:38am    
yes it is an column that holds the primary key values i am trying to update that value
vivektiwari97701 8-Oct-12 5:28am    
set value1=@value1 where value1 = @value1

If you are updating primary key then you need to make sure that no duplicate value should be inserted.

The other problem can be with the relationship if you are refering from any table to this table then you need to update that table first then you can update this table.

Check both the senario.

For the second senario, Either you can delete all the child rows or update child row.

If this not resolve you problem, Please copy the error what you getting while update.
 
Share this answer
 
v4
You cannot update Identity Column Value.
 
Share this answer
 
that is not proper question can u explain it ?
 
Share this answer
 
Comments
CPallini 8-Oct-12 5:50am    
That is not a proper answer, could you explain it, please?
:-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900