|
Element "RelDBQueryDataSource" |
|
|
RelDBQueryDataSource element is used to define a MoreMotion data source. The data sources are invoked by the MoreMotion in order to provide data to the MoreMotion pages. The service class of this data source acquires a JDBC connection through MoreMotion, executes the query and the transfers the columns and their values in the result set into the ADOM data nodes. The responsibility to generate the page XML data out of the ADOMs completely belongs to the MoreMotion.
Properties Connection Name The name of the JDBC connection defined with RelDBConnection element. Query(SQL) The SQL statement valid for the database being accessed is defined in this property. The query statement can include MScript functions to define dynamic queries. Example: SELECT PROD_ID, NAME, PRICE, STOCK FROM products where PROD_ID = @vof(pid)
See: Language Sensitive Data sources In the query statement you can call stored procedures or database funtions. Example: call my_stored_procedure('@vof(NAME)','@vof(PRICE)')
Items Per Page This property is used to define the number of items to be transferred into the ADOM. It may be necessary incase of the number of the records returned from a query is too high. When its value is 0 or less, all records in the result set are transferred to the ADOM.
Pages Per Block Used together with "Items Per Page" to define the number of pages per block. Example: Items Per Page: 20 Pages Per Block: 5
Number of Items Returned: 2000
The results will be displayed in 20 blocks and 100 pages. Note: Examine the "\cpn\mor\Navigators\Navigator.mmel" element, by which one can navigate over the records returned by a query. See Navigating over the data sources that have big amount of result records Set a value to this parameter to force MoreMotion to print debug information to the system console.
|