1

Topic: Adding of new record by means of the navigator

Greetings to all.
There are 2 dependent tables. (1 - a category of the goods and 2 - the goods)
1 Consists of fields ID (not empty) and CATNAME - component IBTable
2 Consists of fields ID (not empty), IDCAT (not empty) and ITEMNAME - component IBDataSet
In a DBMS primary keys 1.ID and 2.ID and also auxiliary key on communication 1.ID and 2.IDCAT are created
On  with 2 the navigator is installed.
Question in the following.
For example in table 1 we rose on record with ID = 3
At button click "to add record" on the navigator on  tables 2 we enter values. After post attempt there is a message "to Field ID value" is required. Like there is a trigger on an increment before an insertion.
Well it is fine. We remove a tick "not empty" from field T2.ID.
The following message after post attempt - "is required to Field IDCAT value".
In property T2.InsertSQL we have request

INSERT INTO T2 (IDCAT, ITEMNAME) VALUES (:IDCAT:ITEMNAME)

I suppose that value:IDCAT - empty.
How in:IDCAT to set value T1.ID and whether correctly I "won" the message "to Field ID value" is required?

2

Re: Adding of new record by means of the navigator

Hadroran wrote:

As in:IDCAT to set value T1.ID and whether correctly I "won" the message "to Field ID value" is required?

1. To set pens
2. What exactly did you win?

3

Re: Adding of new record by means of the navigator

wrote:

On  with 2 the navigator is installed.

Here Delphi nobody knows. ()

4

Re: Adding of new record by means of the navigator

Hadroran wrote:

As in:IDCAT to set value T1.ID

Probably, for  with T2 dependence from  T1 is not specified.
This communication becomes through datasource. We read
http://www.ibase.ru/ibx/
Section Master-Detail.

5

Re: Adding of new record by means of the navigator

Hadroran;
H'm, about a master detail not absolutely in cash register then I will add that in this case  1 is "reference" for a column idcat T2. In general, esteem about  and datasource, etc.

6

Re: Adding of new record by means of the navigator

As always it is not surprised....

7

Re: Adding of new record by means of the navigator

wrote:

it is passed...
Here Delphi nobody knows. ()

Ah yes... The navigator that of a current in ... Forgive that at the wrong door.

8

Re: Adding of new record by means of the navigator

Then who can prompt. In the code for property InsertSQL

INSERT INTO T2 (IDCAT, ITEMNAME) VALUES (:IDCAT:ITEMNAME)

:IDCAT as it is possible to write, that value undertook with 1.ID.
Well for example, so (but so does not work)

INSERT INTO T2 (IDCAT, ITEMNAME) VALUES (: "T1". "ID":ITEMNAME)

9

Re: Adding of new record by means of the navigator

Hadroran> As always it is not surprised....
To what exactly?
1. The topic created not there (moderators transfer).
2. It is a classical sheaf a master detail.
According to its technical implementation
Depends on used library of access
(Which you did not name).

10

Re: Adding of new record by means of the navigator

kdv wrote:

section Master-Detail Is readable http://ibase.ru/ibx.

Looked on a diagonal.
1. At first, in article there is no table of contents with links
(I do not remember, whether was earlier - it seems, was) - for
Articles of such sizes in 2018 it it is even not ridiculous.
2. Article (especially specified section) became outdated
Very strongly, it is necessary to add, .

11

Re: Adding of new record by means of the navigator

Hadroran>:IDCAT as it is possible to write, that value undertook with 1.ID.
Depends on access library. In FIBPlus it is possible to use prefix MAS_.
Well and, of course, in all libraries it is possible to fill manually, probably.

12

Re: Adding of new record by means of the navigator

Rustam wrote:

At first, in article is not present a table of contents with links
(I do not remember, whether was earlier - it seems, was) - for
Articles of such sizes in 2018 it it is even not ridiculous.

There was no there a table of contents. For . It is necessary to read all. Article for beginners, instead of the reference manual with stoppings on the necessary subjects.
In the end-ends there is button Ctrl-F.

Rustam wrote:

Article (especially specified section) became outdated
Very strongly, it is necessary to add

Became outdated in which sense? In IBX all on former, anything essentially new (except ) from the moment of article writing did not appear.
And about that that the author of a topic, there and so was not asks. Type, it is too simple to ask, and anybody did not ask.

13

Re: Adding of new record by means of the navigator

Gadzhimuradov Rustam;
Actually, the question especially interface, and is enough bad. We admit, we see table 2 in .
And how we see table 1? Too in , separate? Also what, it is necessary to rise in  1, and then  the insertion button in  2?
Heresy any. Why not to make in the field idcat falling out list of values from 1. As it to do - it is written in all textbooks.

14

Re: Adding of new record by means of the navigator

kdv> there was no there a table of contents. For . It is necessary to read all
I learn the brother to Kohl, I learn... () If on  on any
Agricultural forum of Tanzania someone writes something
In the same style - I will think that you there holiday lead it.
> Became outdated in which sense?
Time for beginners - it is necessary as HowTo - connected - good fellows, and
so and so (examples for known 2-3 methods).
kdv> actually, a question especially interface
Not, GUI here it is just minor. The HARDWARE wants to interpose
Through assignment DetailDataSet. Fields + Post also asks as.
kdv> Heresy any. Why not to make in the field idcat
kdv> the falling out list of values from 1.
It implies usage , which many
(If not the majority) avoid (who - from fastidiousness, who from
Religious reasons, whom productivity/convenience
Do not arrange, who stupidly could not prepare);) editing
In  that is even worse, than "and". So you heresy. smile))