Subject | Re: [IBO] Setting Master/Detail with TIBO Datasets |
---|---|
Author | Luiz |
Post date | 2002-09-16T21:17Z |
Glaucio,
Keylinks aren't used with the purpose to do master/detail relations.
How is configured your sql statement and datasource to query ITENSCOMPRAS?
I think it would be something as:
For Qry: ITEMCOMPRAS
-----------------------------
SQL: select from field1, field2... from ITEMCOMPRAS where ID_COMPRA = :ID
Datasource:datasource of COMPRAS
Luiz.
Keylinks aren't used with the purpose to do master/detail relations.
How is configured your sql statement and datasource to query ITENSCOMPRAS?
I think it would be something as:
For Qry: ITEMCOMPRAS
-----------------------------
SQL: select from field1, field2... from ITEMCOMPRAS where ID_COMPRA = :ID
Datasource:datasource of COMPRAS
Luiz.
----- Original Message -----
From: "gjannotti" <glaucio@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, September 16, 2002 4:03 PM
Subject: [IBO] Setting Master/Detail with TIBO Datasets
I have the scenario:
2 TIBOQuery´s with a Master/Detail relationship.
The first (master) is set to table COMPRAS with the structure above:
ID INTEGER PK
NUMERO INTEGER
COD_FORNECEDOR INTEGER FK(FORNECEDORES)
VALOR NUMERIC(10,2)
The PK (ID) is a autoincrement field with a generator set into the
before_insert trigger.
The second (detail) is set to table ITENSCOMPRAS with the structure
above:
ID INTEGER PK
ID_COMPRA INTEGER FK(COMPRAS)
COD_PRODUTO INTEGER FK(PRODUTOS)
QTD INTEGER
PRECO NUMERIC(10,2)
The PK (ID) is a autoincrement field with a generator set into the
before_insert trigger.
Why can i configure these two Datasets properties (KEYLINKS...) to
the master/detail relation work whell.
The biggest problem is: The detail table isn´t getting the value of
the field ID of the table COMPRAS.
I have set the propertie GeneratorLink of the table COMPRAS to get
the value of the last value of the Generator, but it don´t work to
the detail rows.
[]´s
Glaucio Jannotti