List more than one table for a single sign-up screen

Asked

Viewed 758 times

1

I have resume registration screen as shown below.

What I needed to do is just register, but the problem is that I have three registration on this screen, personal information, phones and emails.

The phone and emails are linked as foreign key in the personal information. (I did it so he could register the number of phones and emails he wants).

My question is this: when I have more than one record, it will mix with other phones.

For example:

One person registered, then I go there and register several phones and emails of this person. When I register the second person, the phones and emails will be there showing still, I wish that when I ask to register a new one, the two dbGrid were cleaned and went to the other person.

inserir a descrição da imagem aqui

  • You forgot to comment on what technology you are using to perform data access. What are you using? ADO, dbExpress, Firedac?

1 answer

1


You didn’t specify the data access technology you’re using, but you, from what I can make out, need to establish a relationship between the resume table and the phone table and e-mail, a fairly popular way to do this would be using master-detail relationships.

In Delphi it is possible to do this by configuring the data access components. In your DataSet detail table (phone or email) you must indicate in the property MasterSource the name of DataSource of the master table (resumes). It is also necessary to inform in the property MasterFields of this DataSet the key fields that will be used to relate the two tables.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.