Jump to content
Server Maintenance This Week. ×

duplicating record mixes up log entries


hpw

This topic is 6116 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi there!

I have a contact db with a contact table and a related contactLog table.

Now I wanted to duplicate a record as I had a new contact (Let's say: Mr. Smith) related to the same company with the same address as another one (let's say: Mr. Miller) I already had in files and changed only the name and phone number.

Well, now I started to make entries in the log to Mr. Smith's data and afterwards I got the shock: The same Log entry I made for Mr. Smith was also added to the Log of Mr. Miller.

How can I resolve that bug? I attach the relationship graph of the two tables in question.

thanks

hans

Contact_Log.pdf

Link to comment
Share on other sites

Sounds like you are also duplicating the key field in the Contacts table, so it sees the related Log entry as well.

It also sounds like your data model is all wrong. You should have three tables, at least:

Companies

__kP_CompanyID

Name

Contacts

__kP_ContactID

_kF_CompanyID

Name_First

Name_Last

etc.

ContactLog

__kP_LogID

_kF_ContactID

Link to comment
Share on other sites

This topic is 6116 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.