Subject | Re: Can't edit in grid after join |
---|---|
Author | mmenaz |
Post date | 2002-01-29T21:23:47Z |
First of all, you'd really better use the ANSISQL syntax for the
joins, since it's the syntax IBO uderstands better (or understands).
Something like:
SELECT PROJECT.PROJ_NAME,
PROJECT.PROJ_DESC,
PROJ_DEPT_BUDGET.DEPT_NO,
PROJ_DEPT_BUDGET.QUART_HEAD_CNT
FROM PROJECT
INNER JOIN PROJ_DEPT_BUDGET ON (PROJECT.PROJ_ID =
PROJ_DEPT_BUDGET.PROJ_ID)
Second, joins are uneditable without special care, since what fields
and of what table are to be edited?
Ibo gives you tha flexibility of simply specify the table of the join
you want to edit using the 'KeyRelation', or provide custom stored
procedure.
From IBO help:
------
Declaration
Property KeyRelation;
Description
It is possible to make a dataset that is output from a join between
tables capable of inserts and deletes without custom SQL, by
indicating which relation these operations should be applied to.
Observe that only one table can be subjected to update or delete
operations by this means. If you need to make the insert, update and
delete methods operate on two or more of the tables, stored procedures
will be required. Refer to the InsertSQL, EditSQL and DeleteSQL
properties.
------
Hope this will help
Regards
Marco Menardi
joins, since it's the syntax IBO uderstands better (or understands).
Something like:
SELECT PROJECT.PROJ_NAME,
PROJECT.PROJ_DESC,
PROJ_DEPT_BUDGET.DEPT_NO,
PROJ_DEPT_BUDGET.QUART_HEAD_CNT
FROM PROJECT
INNER JOIN PROJ_DEPT_BUDGET ON (PROJECT.PROJ_ID =
PROJ_DEPT_BUDGET.PROJ_ID)
Second, joins are uneditable without special care, since what fields
and of what table are to be edited?
Ibo gives you tha flexibility of simply specify the table of the join
you want to edit using the 'KeyRelation', or provide custom stored
procedure.
From IBO help:
------
Declaration
Property KeyRelation;
Description
It is possible to make a dataset that is output from a join between
tables capable of inserts and deletes without custom SQL, by
indicating which relation these operations should be applied to.
Observe that only one table can be subjected to update or delete
operations by this means. If you need to make the insert, update and
delete methods operate on two or more of the tables, stored procedures
will be required. Refer to the InsertSQL, EditSQL and DeleteSQL
properties.
------
Hope this will help
Regards
Marco Menardi
--- In IBObjects@y..., "slsolutions2002" <strtline@a...> wrote:
> I have 2 tables joined as follows:
>
> SELECT *
> FROM COSTCATEGORIES C,
> COSTCATEGORYDEFINITIONS
> WHERE C.COSTCATEGORYNO=COSTCATEGORYNO
>
> The COSTCATEGORIES table is displayed in a TIB_Grid. All works fine
> except I can not edit any fieldd in the grid. If I remove the join
> as follows:
>
> SELECT *
> FROM COSTCATEGORIES
>
> I can now edit in the grid ?
> Can anyone help ?
> Thanks