--- In [EMAIL PROTECTED], "kamchung322"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is it possible to set the table relations at run time ? Where can I
> find the example ?
>
> Thanks.
>
> Kenneth.

If you are using the tables to be related in request data then
preferably to use Query class
and make relations at run time as in the code:

Query                            query                              =
new Query();
QueryBuildDatasource queryBuildDatasource   = query.addDataSource
(tableNum(SalesTable));
QueryBuildDatasource queryBuildDatasource2 =
queryBuildDatasource.addDataSource(tableNum(SalesLine));
    ;

    queryBuildDataSource2.relations(false);
    queryBuildDataSource2.addLink(fieldnum(SalesTable,SalesId),
fieldnum(SalesLine, SalesId));

the result query looks like
"SELECT * FROM SalesTable JOIN * FROM SalesLine WHERE
SalesTable.SalesId = SalesLine.SalesId"




Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to