Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Formview and DetailView Update

Posted on 2008-06-21
1
Medium Priority
?
270 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

705 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