Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Formview and DetailView Update

Posted on 2008-06-21
1
Medium Priority
?
275 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 1500 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

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

772 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