Fetches data from the Host Integrator server for the current recordset of the current entity.
This method returns a DataSet containing the requested records. If no fields match the fieldNames provided, or if the filterExpression eliminates all records, an empty DataSet is returned.
The set of records returned begins with the first record following the current record. If the current record is before the first record in the recordset, searching starts with the first record. After a FetchRecords, the current record is the last record included in the returned set of records.
Using Filter Expressions
Some of the methods in the .NET connector allow you to use filter expressions when fetching records from a recordset. The syntax you can use to build filter expressions is:
You can use expressions on both the left and right sides of the condition statement. Be sure to enclose data in quotation marks.
|AND||condition_expression AND condition_expression|
|OR||condition_expression OR condition_expression|
|Equal to||value_expression = value_expression|
|Equal to (case insensitive)||value_expression =* value_expression|
|Not equal to||value_expression <> value_expression|
|Less than||value_expression < value_expression|
|Greater than||value_expression > value_expression|
|Less than or equal to||value_expression <= value_expression|
|Greater than or equal to||value_expression >= value_expression ( ) (multiple condition_expressions)|
A value expression can take any of the following:
Filter Expression Examples
This example returns all records in the patients recordset that are not "Smith":
patients.lastname <> "Smith"
This example returns the exact same set of records as the preceding example:
NOT (patients.lastname = "Smith")
This example returns all records in the SearchResults recordset with the last name "Smith" and first name "Steven":
(SearchResults.LastName = "Smith") and (SearchResults.FirstName =* "Steven")
This example returns all fields in the AccountNumbers recordset greater than or equal to 10000 and less than or equal to 20000:
(AccountNumbers.Accounts >= 10000) and (AccountNumbers.Accounts <= 20000)
|HostIntegratorConnectorException||Thrown when client is not connected|
|HostIntegratorTerminalException||Thrown if there is an execution error|
|HostIntegratorModelDefException||Thrown if a reference is made to a nonexistent field|
|HostIntegratorModelDefException||Thrown if the filter expression is not valid|
|HostIntegratorException||Thrown if the connection is for metadata only|
|HostIntegratorModelDefException||Thrown if there is no current recordset|