HostIntegratorSession.NextRecord Method (String)

WRQ.Verastream.HostIntegrator

WRQ Verastream Host Integrator .Net Reference

HostIntegratorSession.NextRecord Method (String)

Finds and returns a record in the current recordset using a filter expression.

[Visual Basic]Overloads Public Function NextRecord( _
   ByVal filterExpression As String _
) As DataSet
[C#]
public DataSet NextRecord(
   string filterExpression
);

Parameters

filterExpression
Specifies an expression that qualifies the records to fetch. See the Remarks section for details.

Return Value

This method returns the next record in the current recordset matching the filter. Searching starts with the record following the current record. If the current record is before the first record in the recordset, searching starts with the first record.

Remarks

If there are no more records in the recordset, this method throws an exception: "Caught VHI Exception in GetItem(); ElementDoesNotExist". (This does not happen in Java.) This method also throws an exception if the specified filter does not match any 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:

condition_statement=condition_expression

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:

  • Variable (variables.variablename)
  • Attribute (attribute name)
  • Field (recordset.recordsetfield)
  • String
  • Integer
  • Floating point number

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)

See Also

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