Click here to Skip to main content
16,017,954 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All,
I need your help, Please help me. How to maintain old addresses and current address of a customer in database. i.e. When customer register we are store his details.And we creates invoice for that customer with current address.Now customer changes his address. We want store old address and new address.
Posted
Updated 13-Aug-13 19:04pm
v3
Comments
kishore sharma 14-Aug-13 2:07am    
instead of doing these things which are provided in solutions ,i would suggest you to go for Audit log, by this you will come to know important thing used in projects,where login accounts are used.
Maciej Los 14-Aug-13 3:56am    
What is your question?
What have you done, where are you stuck?

First of all you have to add one more column into your table i.e
Updated_Address.

i assume that you have two different method for create and update.
so When you are going to update a records instead of ur current address field you can use Updated_address field and save it.

i just assume that you have two different method for it but if you post your code then i definitely provide correct solution.
 
Share this answer
 
Have a separate address table. In that table store a "created" date. When selecting what address to use, select the address with the most current date. Link the address table to the customer table with a customer ID.
 
Share this answer
 

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