Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 29th, 2008, 10:13 AM
Authorized User
 
Join Date: Sep 2004
Posts: 62
Thanks: 0
Thanked 1 Time in 1 Post
Default Saving Original Data via DetailsView Update

I am somewhat new to these .NET controls and was wondering if this is even possible, and if so can someone point me in the right direction. I have a web form that populates an affiliates account information into a DetailsView control on the form. Each affiliate only has one record with only a handful of columns that they will be able to update so this seemed like the right control to use.

I have the data populating and even edit/updating correctly, but what I want to do is also save the original data to a different table when a change is made. How can I compare changes made in the DetailsView edit, and more importanly - how do INSERT to a different table the data while still saving the changes the affiliate made. Make any sense?

Thanks in adavance for any help on this.

 
Old May 29th, 2008, 10:21 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hi there.. I think this can be easily done with a trigger, what database are you using?

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old May 29th, 2008, 11:07 AM
Authorized User
 
Join Date: Sep 2004
Posts: 62
Thanks: 0
Thanked 1 Time in 1 Post
Default

I am using SQL Server 2K5, database named "db_WebTrans".

The table being updated is named "Affiliates", and the table I wish to write the changes made is called "Aff_Update". Very straight forward in that respect.
 
Old May 29th, 2008, 01:19 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Well, I'm not a trigger expert (altough they work very similar to an SP), but if you add a triger in the update, you have the data that has been changed and the data that you add, and you can add the old data to the new table without problems.

IMHO you should be looking on how to put this in a trigger..

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old May 29th, 2008, 01:40 PM
Authorized User
 
Join Date: Sep 2004
Posts: 62
Thanks: 0
Thanked 1 Time in 1 Post
Default

I am not familiar with this, so I write this directly into the SqlDataSource Update Query?

 
Old May 29th, 2008, 01:47 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

nop, inside the database.

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
DetailsView update not working. Andrew.Berry ASP.NET 2.0 Professional 6 April 22nd, 2008 11:23 AM
Cannot Update the vals in a Dynamic DetailsView Itech ASP.NET 2.0 Professional 6 April 2nd, 2008 01:59 AM
DetailsView update onclick on LinkButton yukijocelyn ASP.NET 2.0 Basics 1 September 10th, 2007 03:43 AM
Original form SaveAs new doc w/o original VBA ChuckTremain Word VBA 0 February 8th, 2007 02:58 PM
DataList original values at update time MColeman ASP.NET 1.x and 2.0 Application Design 2 February 19th, 2004 03:23 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.