Simple Query |
Scroll |
The pseudo-static ExecuteSimple method of the TheQuery class allows you to conveniently specify a document query if your query meets the following conditions:
The query is executed in a single category (not a multi-query)
Conditions are specified for at most one category field.
Results are to be sorted by at most one category field.
If your query does not meet these conditions, you have to specify and execute a regular query. See "Query in One Category" and/or "Query in Multiple Category" for detailed instructions.
1 |
Connect to the Thereforeâ„¢ server (see "Server - Connect and Disconnect" for Details) |
2 |
Create a new temporary TheQuery and call the ExecuteSimple method. Consider declaring a (static) TheQuery member if you plan on using ExecuteSimple fequently. Please consult the documentation of the ExecuteSimple method for more information on parameters and usage. |
3 |
Optional. Display a message box with the results. |
Requirements and Assumptions: Category number 5 with string field 70. At least one document in that category where the field 70 value starts with a "3" (otherwise the results are empty). If these assumptions do not apply to your system or configuration please replace them with appropriate values when copying the code samples below. |
Pseudo-Static Method This method does not read or write any member variables of the class it belongs to and should be used like a static method. Unfortunately, Component Object Model (COM) interfaces do not support the concept of static methods. You may declare a temporary instance when using the method once or create a singleton or static member in the calling class if you plan on using it frequently. |