poIQueryCtrl GetIteratorHandle
Creates and returns a handle to the QueryIterator object that allows you to iterate through query results.
Syntax
poIQueryCtrl_handle GetIteratorHandlename
Application
HyperView Tcl Query
Description
Inputs
- name
- The name of the iterator handle.
Example
proc QueryData {model selection query_string {output stdout}} {
# get query control handle
$model GetQueryCtrlHandle Query1
# set query parameters
Query1 SetQuery $query_string
Query1 SetSelectionSet [$selection GetID]
# query
Query1 GetIteratorHandle iter1
# output data ...........................
if { $output == "stdout" } {
# output to console
while { [iter1 Valid] }
puts [iter1 GetDataList]
iter1 Next
}
} else {
# output to user-defined stream
Query1 WriteData $output
}
# cleanup
iter1 ReleaseHandle
Query1 ReleaseHandle
}
Errors
Returns 0 if successful, otherwise an error code (HW_Error).