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?