Click here to Skip to main content
15,905,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello friends,


i have online shopping website. i have deleted some product from database in Product table. in that table i have one field name ID which is auto increment. now i want to upload a new product in my Product table. after that want to update the ID field. i want to set the ID of that record which i previously deleted....
IS that posible to Set that ID???


Replay


Thank You....
Posted

1 solution

No,You can't.
The only way I know by truncating your table then by inserting all records again!
 
Share this answer
 
Comments
Yatin_Chauhan 12-Apr-12 11:26am    
I HAVE updated that ID using update query. also update all the table related to product. and they all are updated... but the problem is that to display in front side. it gives error..
thx u for replay abhijeet
Yatin_Chauhan 12-Apr-12 11:38am    
i got the error like that
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
abhijeetgupta1988 13-Apr-12 12:47pm    
then I guess you need to check with your stored proc/query,and few exception handling blocks!

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