?
Solved

Key code situation

Posted on 2006-03-30
7
Medium Priority
?
214 Views
Last Modified: 2010-04-23
Hi,

   I have an application that have many many tables with data all references by a code key for example the passport number, What i need from you is some idea to confront with the next situation.


   If a person comes tomorrow and tell me that that passport number is incorrect how can i do to chane the reference to that person with the less work popssible.

  For example creating a duplicate record in the main table refering the old pasport numberand the new one.

The best idea get the reward :)
Thanks
0
Comment
  • 3
  • 2
6 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 16336390
I would have 2 Columns holding the info

UniqueID - Which holds the Identity (increments with each number)
PAssportID - An ID thats changeable

OF course through your whole program you will use the UniqueID but for the Interface you will show the PassportID
0
 
LVL 12

Author Comment

by:Alfredo Luis Torres Serrano
ID: 16336921
Yes bu the problem here is that i have data that i need to be refereced to the new passprt id, that is i have a lot of documents with the old ID. How do my interface will now that the old documents belong to the same person?
0
 
LVL 12

Author Comment

by:Alfredo Luis Torres Serrano
ID: 16336954
Never mind forgot that, The problem is that i have a lot of tables referenced with the document number´'Passport id' and a table with the unique id and the passport and other tables that mae reference to the id.

How can i change the passport without having to change all the tables
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 48

Expert Comment

by:Mikal613
ID: 16337504
you would have to create a Batch Utility where you would go through all the tables and change the id

Update Tablename set PassportID = (Select UniqueID FROM MasterIds WHERE PID = PassportID)
0
 
LVL 12

Author Comment

by:Alfredo Luis Torres Serrano
ID: 16341995
Thanks mike but i found the correct solution that was.


     Duplicate the master record with the new passportid hold in a var the old passportid, the new one and the id assigned to it, later i will replace in the conextion table the id with the new passportid.

Godd Hunt :)
0
 

Accepted Solution

by:
GranMod earned 0 total points
ID: 16371027
Closed, 250 points refunded.
GranMod
The Experts Exchange
Community Support Moderator of all Ages
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

840 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