Solved

Formview and DetailView Update

Posted on 2008-06-21
1
255 Views
Last Modified: 2010-05-18
How can a prinary key field be updated in Formview and DetailView in ASP.NET 2? The primary key filed visibly doesn't get updated. Thanks.
0
Comment
Question by:ksfok
1 Comment
 
LVL 14

Accepted Solution

by:
Dustin Hopkins earned 500 total points
ID: 21839707
Is there a reason you need to update a primary key field? You should consider changing your database structure. Hidden, meaningless integer primary keys are preferred over primary keys that contain meaningful data. Because you want to be able to update this attribute, it should not be the primary key. Instead, place a unique constraint on it and define a hidden, meaningless integer primary key. Also the primary key is indexed(MSSQL), so each time you change this field the table indexes must be rebuilt.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question