|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Library Reference > Database > DBWLoadQuery1 |
Similar to DBWLoadQuery but allowing the specification of the result type.
Sub DBWLoadQuery1(Title, Query, QueryTypeString)
Title |
a name for the query to load |
|---|---|
Query |
sql statement |
QueryTypeString |
the type of query to perform; possible values are: •"WORKINGSET" : fills the TreePage WorkingSet tab with query results •"SELECTION" : fills the QueryPage grid with results •"FILTER" : refines the currently selected records. AND <condition> |
when specified the QueryTypeString as "WORKINGSET" you've to pass a list of uids formatted as string:
100,101,102,103
if the string containing uids is larger than 4096 characters, you've to define it as follows:
100,
101,
102,
103
In case the list of unique_ids is greater than 8k chars, a database table named DBW_WS_<userName> will be created to manage the data
DBWLoadQuery with large working sets
It loads a query in the QueryPage and let you choose to obtain results in a simple selection or in working set in the TreePage.
Sub DBWLoadQuery
Sub Main()
title = "Only_projects"
query = "SELECT * FROM DOCUMENT WHERE T='0'"
DBWLoadQuery1 title, query, "SELECTION"
end sub
Sub Main()
title = "My Working Set"
query = "15,16,17,1003,2005"
DBWLoadQuery1 title, query, "WORKINGSET"
end sub
Sub Main()
title = "Filtering"
query = "AND T='D'"
DBWLoadQuery1 title, query, "FILTER"
end sub