| Query, RunSave, ODBC / Oracle / SQL / JDBC |
This function executes the query that has been specified through the other Query functions. The result is a new page, but the bulk of the data is cached to a NOD file which conserves memory and expedites access.
Syntax:Query, RunSave, queryType, connectionString, filename Parameters:queryType – the type of query { odbc, oracle, sql, jdbc } connectionString – the connection string for the query filename – the file name for the optimized NOD file; must have ‘.nod’ file extension Examples:Query,Command,"select order,product,category,2006,2007,forecast" Query,CommandAppend,"from sales_history" Query,Roles,order=RowLabel_;product=Text_;category=Text_; 2006=Numeric_;2007=Numeric_;forecast=Ignore_ Query,RowLabel,Orders Query,Captions,2006 Sales;2007 Sales Query,TextColumnNames,Product Line;Product Category Query,RunSave,SQL,"Server=DBserver;Database=dbname; Trusted_Connection=yes",file.nod This example runs the query using the connection string provided and output goes directly to the optimized NOD file named ‘file.nod’. The entire Query sequence is included for clarity. Query,Command,"select order as RowLabel_Orders,product as [text_Product Line],category as [text_Product Category],2006 as [numeric_2006 Sales],2007 as [numeric_2007 Sales],forecast as Ignore_Forecast " Query,CommandAppend," from sales_history" Query,RunSave,SQL,"Server=DBserver;Database=dbname; Trusted_Connection=yes",file.nod This example is identical to above, but uses the field names in the query to set the roles and captions. Square brackets are used in the query to encapsulate the spaces in the field names, so care should be taken to ensure that NextAnalytics prompts are not created with the same character sequences. Comments:The NOD file is optimized for retrieval and the query returns results directly to the file and is not loaded into memory first. This is an important consideration if the size of the query is large. These Query commands are usually grouped together into a file in the user’s pages directory and called from an AddQueryPage command. |
| < Prev | Next > |
|---|