Verastream Host Integrator .Net Reference

HostIntegratorSession.UpdateRecordByFilter Method (DataSet, String)

Changes the values of a record in the current recordset. The record that gets changed is the first one after the current record that satisfies the filter expression.

[Visual Basic]
Overloads Public Function UpdateRecordByFilter( _
   ByVal record As DataSet, _
   ByVal filterExpression As String _
) As Boolean
public bool UpdateRecordByFilter(
   DataSet record,
   string filterExpression


Specifes one or more name-value pairs for the record elements to be updated.
Specifies an expression that qualifies the records to be updated. See the Remarks section for details.

Return Value

This method returns True if a record is found to update and the Host Integrator server performs the record update, and False otherwise.


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.

Condition Expressions

AND condition_expression AND condition_expression
OR condition_expression OR condition_expression
NOT NOT 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)

Value 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)


Exception TypeCondition
HostIntegratorConnectorExceptionThrown if client is not connected
HostIntegratorExceptionThrown if the connection is for metadata only
HostIntegratorModelDefExceptionThrown if a reference is made to a nonexistent field
HostIntegratorModelDataExceptionThrown if the filter expression is not valid
HostIntegratorTerminalExceptionThrown if there is an execution error

See Also

HostIntegratorSession Class | HostIntegratorSession Members | WRQ.Verastream.HostIntegrator Namespace | HostIntegratorSession.UpdateRecordByFilter Overload List