Subject Re: TIB_Query & join selects
Author Svein Erling Tysvær
Helen answered:
> In IBO, you can make one table in a joined set updatable by setting the
> KeyRelation property to the name of that table. The Keylinks must
> include the primary key of that table. Set RequestLive true.

Since the PK of A seems to be unique in the result set, you can simply set
KeyLinks to a.idparte, no need to involve any field from b in the keylinks.


--- In, "yartax1" wrote:
> When I said a "master query class", I tried to explain a class with
> all the queries performed to bbdd. This class is like:
> class bbdd
> {
> AnsiString get_parte ( int usuario );
> AnsiString get_revision ( int usuario );
> ....
> }
> This class returns AnsiStrings ( queries ) to pass to the TIB_Query.
> This is good to separate form code from database code.
> In my case I want make the next query:
> Select a.*
> from incidencia_parte a
> inner join usuario_centro b
> on a.centro = b.centro
> where fbaja is null and idusuario=1
> order by a.centro,fregistro
> Primary keys:
> a.idparte
> b.idusuario
> b.centro
> My question is; this query is only possible in a procedure?